{
  "openapi": "3.1.0",
  "info": {
    "title": "eTally External API",
    "version": "0.3.0",
    "description": "Company-scoped API-key data plane. Expanded normalized GET projections require migration 0003; rollout pending. GET and validation were deployed before this expansion; create dispatch remains disabled pending live/queue acceptance."
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/v1/company": {
      "get": {
        "summary": "Company identity",
        "description": "Required scope: company:read. Expanded normalized projection external-read-v2 requires migration 0003 and schema snapshot (3). Nullable stored values are preserved; raw source payloads are excluded. Lists return full published headers/master fields; voucher detail adds lines, nested ledger allocations, ledger entries and currency-specific ledger summaries. Follow links.next for additional pages. See meta.unavailable_sections for data not captured by the mirror. This is not an authoritative current-stock or settlement report.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReadCompany"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ReadMeta"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Data-Cache": {
                "description": "Private application cache status. Does not authorize browser/CDN caching. Feature flags initially off.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS",
                    "BYPASS"
                  ]
                }
              },
              "X-Data-Cache-Age": {
                "description": "Seconds since cached mirror response was fetched; not Tally sync age.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/connection": {
      "get": {
        "summary": "Agent and Tally connection readiness",
        "description": "Required scope: company:read. Synced reads are eventually consistent. See coverage-matrix.md for the exact published fields.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {},
                    "meta": {
                      "type": "object"
                    },
                    "links": {
                      "type": "object"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/masters/{kind}": {
      "get": {
        "summary": "List company masters",
        "description": "Required scope: masters:read. Expanded normalized projection external-read-v2 requires migration 0003 and schema snapshot (3). Nullable stored values are preserved; raw source payloads are excluded. Lists return full published headers/master fields; voucher detail adds lines, nested ledger allocations, ledger entries and currency-specific ledger summaries. Follow links.next for additional pages. See meta.unavailable_sections for data not captured by the mirror. This is not an authoritative current-stock or settlement report.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "customers",
                "suppliers",
                "ledgers",
                "ledger-groups",
                "stock-items",
                "stock-groups",
                "stock-categories",
                "units"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/ReadParties"
                          },
                          {
                            "$ref": "#/components/schemas/ReadAccounts"
                          },
                          {
                            "$ref": "#/components/schemas/ReadLedgerGroups"
                          },
                          {
                            "$ref": "#/components/schemas/ReadStockItems"
                          },
                          {
                            "$ref": "#/components/schemas/ReadStockGroups"
                          },
                          {
                            "$ref": "#/components/schemas/ReadStockCategories"
                          },
                          {
                            "$ref": "#/components/schemas/ReadUnits"
                          }
                        ]
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ReadMeta"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "links": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "next": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "next"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Data-Cache": {
                "description": "Private application cache status. Does not authorize browser/CDN caching. Feature flags initially off.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS",
                    "BYPASS"
                  ]
                }
              },
              "X-Data-Cache-Age": {
                "description": "Seconds since cached mirror response was fetched; not Tally sync age.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/masters/{kind}/{id}": {
      "get": {
        "summary": "Read one company master",
        "description": "Required scope: masters:read. Expanded normalized projection external-read-v2 requires migration 0003 and schema snapshot (3). Nullable stored values are preserved; raw source payloads are excluded. Lists return full published headers/master fields; voucher detail adds lines, nested ledger allocations, ledger entries and currency-specific ledger summaries. Follow links.next for additional pages. See meta.unavailable_sections for data not captured by the mirror. This is not an authoritative current-stock or settlement report.",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "customers",
                "suppliers",
                "ledgers",
                "ledger-groups",
                "stock-items",
                "stock-groups",
                "stock-categories",
                "units"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ReadParties"
                        },
                        {
                          "$ref": "#/components/schemas/ReadAccounts"
                        },
                        {
                          "$ref": "#/components/schemas/ReadLedgerGroups"
                        },
                        {
                          "$ref": "#/components/schemas/ReadStockItems"
                        },
                        {
                          "$ref": "#/components/schemas/ReadStockGroups"
                        },
                        {
                          "$ref": "#/components/schemas/ReadStockCategories"
                        },
                        {
                          "$ref": "#/components/schemas/ReadUnits"
                        }
                      ]
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ReadMeta"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Data-Cache": {
                "description": "Private application cache status. Does not authorize browser/CDN caching. Feature flags initially off.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS",
                    "BYPASS"
                  ]
                }
              },
              "X-Data-Cache-Age": {
                "description": "Seconds since cached mirror response was fetched; not Tally sync age.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers": {
      "get": {
        "summary": "List synced vouchers",
        "description": "Required scope: vouchers:read. Expanded normalized projection external-read-v2 requires migration 0003 and schema snapshot (3). Nullable stored values are preserved; raw source payloads are excluded. Lists return full published headers/master fields; voucher detail adds lines, nested ledger allocations, ledger entries and currency-specific ledger summaries. Follow links.next for additional pages. See meta.unavailable_sections for data not captured by the mirror. This is not an authoritative current-stock or settlement report.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 4096
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "sales",
                "purchase",
                "payment",
                "receipt",
                "contra",
                "journal",
                "debit_note",
                "credit_note"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReadVouchers"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ReadMeta"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "links": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "next": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "next"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Data-Cache": {
                "description": "Private application cache status. Does not authorize browser/CDN caching. Feature flags initially off.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS",
                    "BYPASS"
                  ]
                }
              },
              "X-Data-Cache-Age": {
                "description": "Seconds since cached mirror response was fetched; not Tally sync age.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{id}": {
      "get": {
        "summary": "Read voucher header, lines and ledger entries",
        "description": "Required scope: vouchers:read. Expanded normalized projection external-read-v2 requires migration 0003 and schema snapshot (3). Nullable stored values are preserved; raw source payloads are excluded. Lists return full published headers/master fields; voucher detail adds lines, nested ledger allocations, ledger entries and currency-specific ledger summaries. Follow links.next for additional pages. See meta.unavailable_sections for data not captured by the mirror. This is not an authoritative current-stock or settlement report.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Safe resource projection with freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReadVoucherDetail"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ReadMeta"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "request_id"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "X-Data-Cache": {
                "description": "Private application cache status. Does not authorize browser/CDN caching. Feature flags initially off.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS",
                    "BYPASS"
                  ]
                }
              },
              "X-Data-Cache-Age": {
                "description": "Seconds since cached mirror response was fetched; not Tally sync age.",
                "schema": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{id}": {
      "get": {
        "summary": "Read this integration’s operation",
        "description": "Required scope: operations:read. Synced reads are eventually consistent. See coverage-matrix.md for the exact published fields.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Durable operation status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/sales": {
      "post": {
        "summary": "Create sales in Tally",
        "description": "Scope: sales:create. Server prepares and validates before admission. Stable Idempotency-Key required. 900 KiB body ceiling; prepared payload limited by internal MAX_WRITE_PAYLOAD_BYTES (128 KiB default). Posting disabled until live/queue acceptance. Frozen admitted envelope wins on retry. Never blindly repost unknown outcomes.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[!-~]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Sales"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed confirmed operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "201": {
            "description": "Tally confirmed creation",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Pending, queued, cancelled or unknown; inspect status and poll Location",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency content/route conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/purchases": {
      "post": {
        "summary": "Create purchases in Tally",
        "description": "Scope: purchases:create. Server prepares and validates before admission. Stable Idempotency-Key required. 900 KiB body ceiling; prepared payload limited by internal MAX_WRITE_PAYLOAD_BYTES (128 KiB default). Posting disabled until live/queue acceptance. Frozen admitted envelope wins on retry. Never blindly repost unknown outcomes.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[!-~]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Purchase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed confirmed operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "201": {
            "description": "Tally confirmed creation",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Pending, queued, cancelled or unknown; inspect status and poll Location",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency content/route conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/payments": {
      "post": {
        "summary": "Create payments in Tally",
        "description": "Scope: payments:create. Server prepares and validates before admission. Stable Idempotency-Key required. 900 KiB body ceiling; prepared payload limited by internal MAX_WRITE_PAYLOAD_BYTES (128 KiB default). Posting disabled until live/queue acceptance. Frozen admitted envelope wins on retry. Never blindly repost unknown outcomes.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[!-~]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settlement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed confirmed operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "201": {
            "description": "Tally confirmed creation",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Pending, queued, cancelled or unknown; inspect status and poll Location",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency content/route conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/receipts": {
      "post": {
        "summary": "Create receipts in Tally",
        "description": "Scope: receipts:create. Server prepares and validates before admission. Stable Idempotency-Key required. 900 KiB body ceiling; prepared payload limited by internal MAX_WRITE_PAYLOAD_BYTES (128 KiB default). Posting disabled until live/queue acceptance. Frozen admitted envelope wins on retry. Never blindly repost unknown outcomes.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[!-~]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settlement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed confirmed operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "201": {
            "description": "Tally confirmed creation",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Pending, queued, cancelled or unknown; inspect status and poll Location",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency content/route conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/sales/validate": {
      "post": {
        "summary": "Validate and preview sales without posting",
        "description": "Same create scope required. Pure preparation only, no admission/idempotency consumption/queue/agent. May be used while posting disabled. Live master/company/books/import checks remain pending.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Sales"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data.valid=true, posted=false, prepared_payload, totals, adapter_version=2, schema_version and checks_pending. Does not guarantee later Tally acceptance.",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/purchases/validate": {
      "post": {
        "summary": "Validate and preview purchases without posting",
        "description": "Same create scope required. Pure preparation only, no admission/idempotency consumption/queue/agent. May be used while posting disabled. Live master/company/books/import checks remain pending.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Purchase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data.valid=true, posted=false, prepared_payload, totals, adapter_version=2, schema_version and checks_pending. Does not guarantee later Tally acceptance.",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/payments/validate": {
      "post": {
        "summary": "Validate and preview payments without posting",
        "description": "Same create scope required. Pure preparation only, no admission/idempotency consumption/queue/agent. May be used while posting disabled. Live master/company/books/import checks remain pending.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settlement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data.valid=true, posted=false, prepared_payload, totals, adapter_version=2, schema_version and checks_pending. Does not guarantee later Tally acceptance.",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    },
    "/v1/receipts/validate": {
      "post": {
        "summary": "Validate and preview receipts without posting",
        "description": "Same create scope required. Pure preparation only, no admission/idempotency consumption/queue/agent. May be used while posting disabled. Live master/company/books/import checks remain pending.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Settlement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "data.valid=true, posted=false, prepared_payload, totals, adapter_version=2, schema_version and checks_pending. Does not guarantee later Tally acceptance.",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in company/integration scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "415": {
            "description": "JSON without compression required",
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "description": "Validation or definitive accounting refusal; may include data operation",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/Operation"
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "429": {
            "description": "Rate exceeded",
            "headers": {
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              },
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable; creates must retain the same idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "description": "Server-generated UUID used across the private request chain. Distinct from operation ID.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "Cache-Control": {
                "description": "Authenticated responses remain no-store.",
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Retry-After": {
                "description": "Integer seconds before a bounded retry. Preserve create body and idempotency key.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3600
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "et_live_<id>_<secret>"
      }
    },
    "schemas": {
      "InventoryLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "stock_item_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "unit": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "quantity": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^(0|[1-9][0-9]{0,7})(.[0-9]{1,3})?$",
            "description": "Decimal string, at most 12 significant digits; no JSON numbers or exponent notation."
          },
          "rate": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^(0|[1-9][0-9]{0,7})(.[0-9]{1,6})?$",
            "description": "Decimal string, at most 12 significant digits; no JSON numbers or exponent notation."
          },
          "gst_rate_percent": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^(0|[1-9][0-9]{0,7})(.[0-9]{1,4})?$",
            "description": "Required explicit rate 0–100. Zero for a No GST line. Feeds preparation only; connector uses stock master tax classification."
          }
        },
        "required": [
          "stock_item_name",
          "unit",
          "quantity",
          "rate",
          "gst_rate_percent"
        ]
      },
      "BillAllocation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "bill_type": {
            "type": "string",
            "enum": [
              "NewRef",
              "AgstRef",
              "Advance",
              "OnAccount"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "amount": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^(0|[1-9][0-9]{0,7})(.[0-9]{1,2})?$",
            "description": "Decimal string, at most 12 significant digits; no JSON numbers or exponent notation."
          }
        },
        "required": [
          "bill_type",
          "amount"
        ],
        "description": "Positive amount. Name required except OnAccount, which forbids a name."
      },
      "SettlementLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "amount": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^(0|[1-9][0-9]{0,7})(.[0-9]{1,2})?$",
            "description": "Decimal string, at most 12 significant digits; no JSON numbers or exponent notation."
          },
          "bill_allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillAllocation"
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "ledger_name",
          "amount"
        ],
        "description": "Positive line amount. Allocations, when supplied, must sum exactly to it. Bank total is derived."
      },
      "Sales": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "UTC API date must not exceed tomorrow. Connector rechecks its local clock and books begin."
          },
          "voucher_type": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "narration": {
            "type": "string",
            "maxLength": 250
          },
          "party_ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryLine"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "tax_kind": {
            "type": "string",
            "enum": [
              "none",
              "intrastate",
              "interstate"
            ]
          },
          "gst_ledgers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "cgst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "sgst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "igst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "round_off": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              }
            },
            "required": []
          },
          "round_to_rupee": {
            "type": "boolean",
            "default": false
          },
          "round_off_override": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^-?(0|[1-9][0-9]{0,7})(.[0-9]{1,2})?$",
            "description": "Magnitude at most 1; overrides derived rounding. Zero omits rounding entry."
          },
          "party_gstin": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{15}$"
          },
          "place_of_supply": {
            "type": "string",
            "maxLength": 250
          },
          "party_state": {
            "type": "string",
            "maxLength": 250
          },
          "party_country": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$",
            "default": "India"
          },
          "registration_type": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$",
            "enum": [
              "Unknown",
              "Composition",
              "Consumer",
              "Unregistered/Consumer",
              "Regular",
              "Unregistered",
              "Government entity / TDS",
              "Regular - SEZ",
              "Regular-Deemed Exporter",
              "Regular-Exports (EOU)",
              "e-Commerce Operator",
              "Input Service Distributor",
              "Embassy/UN Body",
              "Non-Resident Taxpayer",
              "OIDAR"
            ]
          },
          "sales_ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "reference": {
            "type": "string",
            "maxLength": 250
          }
        },
        "required": [
          "date",
          "voucher_type",
          "party_ledger_name",
          "sales_ledger_name",
          "lines",
          "tax_kind"
        ]
      },
      "Purchase": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "UTC API date must not exceed tomorrow. Connector rechecks its local clock and books begin."
          },
          "voucher_type": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "narration": {
            "type": "string",
            "maxLength": 250
          },
          "party_ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryLine"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "tax_kind": {
            "type": "string",
            "enum": [
              "none",
              "intrastate",
              "interstate"
            ]
          },
          "gst_ledgers": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "cgst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "sgst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "igst": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              },
              "round_off": {
                "type": "string",
                "maxLength": 250,
                "minLength": 1,
                "pattern": "^[^\"\u0000-\u001f]+$"
              }
            },
            "required": []
          },
          "round_to_rupee": {
            "type": "boolean",
            "default": false
          },
          "round_off_override": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^-?(0|[1-9][0-9]{0,7})(.[0-9]{1,2})?$",
            "description": "Magnitude at most 1; overrides derived rounding. Zero omits rounding entry."
          },
          "party_gstin": {
            "type": "string",
            "pattern": "^[0-9A-Za-z]{15}$"
          },
          "place_of_supply": {
            "type": "string",
            "maxLength": 250
          },
          "party_state": {
            "type": "string",
            "maxLength": 250
          },
          "party_country": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$",
            "default": "India"
          },
          "registration_type": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$",
            "enum": [
              "Unknown",
              "Composition",
              "Consumer",
              "Unregistered/Consumer",
              "Regular",
              "Unregistered",
              "Government entity / TDS",
              "Regular - SEZ",
              "Regular-Deemed Exporter",
              "Regular-Exports (EOU)",
              "e-Commerce Operator",
              "Input Service Distributor",
              "Embassy/UN Body",
              "Non-Resident Taxpayer",
              "OIDAR"
            ]
          },
          "purchase_ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "supplier_invoice_number": {
            "type": "string",
            "maxLength": 250
          },
          "supplier_invoice_date": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "date",
          "voucher_type",
          "party_ledger_name",
          "purchase_ledger_name",
          "lines",
          "tax_kind"
        ]
      },
      "Settlement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "UTC API date must not exceed tomorrow. Connector rechecks its local clock and books begin."
          },
          "voucher_type": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "narration": {
            "type": "string",
            "maxLength": 250
          },
          "bank_ledger_name": {
            "type": "string",
            "maxLength": 250,
            "minLength": 1,
            "pattern": "^[^\"\u0000-\u001f]+$"
          },
          "reference": {
            "type": "string",
            "maxLength": 250
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettlementLine"
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "required": [
          "date",
          "voucher_type",
          "bank_ledger_name",
          "lines"
        ]
      },
      "Operation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "queued",
              "succeeded",
              "failed",
              "unknown",
              "cancelled"
            ]
          },
          "requires_reconciliation": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "voucher_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "master_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "sync_status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "fields": {
                "type": "array",
                "maxItems": 50,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "code",
                    "message"
                  ]
                }
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "request_id"
        ]
      },
      "ReadCompanyProfiles": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tally_company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_company_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "formal_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "pan": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_person": {
            "type": [
              "string",
              "null"
            ]
          },
          "mobile_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "landline_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "state_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "country_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "pincode": {
            "type": [
              "string",
              "null"
            ]
          },
          "financial_year_from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "books_from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "gst_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "legacy_gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "gst_registrations": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ReadCompanyGstRegistration"
            }
          }
        },
        "required": [
          "tally_company_name",
          "tally_company_guid",
          "formal_name",
          "pan",
          "contact_person",
          "mobile_no",
          "landline_no",
          "contact_number",
          "email",
          "website",
          "address_text",
          "state_name",
          "country_name",
          "pincode",
          "financial_year_from",
          "books_from",
          "gst_enabled",
          "legacy_gstin",
          "synced_at",
          "created_at",
          "updated_at",
          "gst_registrations"
        ]
      },
      "ReadParties": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "party_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "alias": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "mailing_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_person": {
            "type": [
              "string",
              "null"
            ]
          },
          "mobile_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "landline_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Normalized address lines only; malformed source structures return null."
          },
          "gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_registration_type": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_party_type": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "pan_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "place_of_supply": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_billwise": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "credit_period": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit_limit": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "opening_balance_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "opening_balance_is_debit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "gst_registration_details": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ReadPartyGstRegistration"
            }
          }
        },
        "required": [
          "id",
          "party_kind",
          "name",
          "display_name",
          "group_name",
          "group_id",
          "alias",
          "party_code",
          "mailing_name",
          "contact_person",
          "mobile_no",
          "landline_no",
          "email",
          "website",
          "country",
          "state",
          "city",
          "pin_code",
          "address",
          "gstin",
          "gst_registration_type",
          "gst_party_type",
          "pan_number",
          "place_of_supply",
          "is_billwise",
          "credit_period",
          "credit_limit",
          "opening_balance_amount",
          "opening_balance_is_debit",
          "is_active",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at",
          "gst_registration_details"
        ]
      },
      "ReadAccounts": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "account_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ifsc_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "micr_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "upi_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_holder_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "opening_balance_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "opening_balance_is_debit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "opening_balance_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "account_kind",
          "name",
          "group_name",
          "group_id",
          "account_code",
          "currency_code",
          "bank_name",
          "account_number",
          "branch_name",
          "ifsc_code",
          "micr_code",
          "upi_id",
          "account_holder_name",
          "opening_balance_amount",
          "opening_balance_is_debit",
          "opening_balance_as_of",
          "is_active",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at"
        ]
      },
      "ReadLedgerGroups": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_revenue": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_deemed_positive": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "affects_gross_profit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_subledger": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "sort_position": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "reserved_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "parent_name",
          "is_revenue",
          "is_deemed_positive",
          "affects_gross_profit",
          "is_subledger",
          "sort_position",
          "reserved_name",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at"
        ]
      },
      "ReadStockItems": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "category_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "base_unit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "additional_unit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "stock_group_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "stock_category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "base_unit_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "additional_unit_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "opening_balance": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "opening_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "opening_value": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_applicable": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_type_of_supply": {
            "type": [
              "string",
              "null"
            ]
          },
          "hsn_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "gst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cgst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "sgst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "igst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cess_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_taxability": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_nature_of_transaction": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "parent_name",
          "category_name",
          "base_unit_name",
          "additional_unit_name",
          "stock_group_id",
          "stock_category_id",
          "base_unit_id",
          "additional_unit_id",
          "opening_balance",
          "opening_rate",
          "opening_value",
          "gst_applicable",
          "gst_type_of_supply",
          "hsn_code",
          "is_active",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at",
          "gst_rate",
          "cgst_rate",
          "sgst_rate",
          "igst_rate",
          "cess_rate",
          "gst_taxability",
          "gst_nature_of_transaction"
        ]
      },
      "ReadStockGroups": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "hsn_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_applicability": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cgst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "sgst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "igst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cess_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_taxability": {
            "type": [
              "string",
              "null"
            ]
          },
          "gst_nature_of_transaction": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "parent_name",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at",
          "hsn_code",
          "gst_applicability",
          "gst_rate",
          "cgst_rate",
          "sgst_rate",
          "igst_rate",
          "cess_rate",
          "gst_taxability",
          "gst_nature_of_transaction"
        ]
      },
      "ReadStockCategories": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "parent_name",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at"
        ]
      },
      "ReadUnits": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_simple_unit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "base_units": {
            "type": [
              "string",
              "null"
            ]
          },
          "additional_units": {
            "type": [
              "string",
              "null"
            ]
          },
          "conversion": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "original_name",
          "is_simple_unit",
          "base_units",
          "additional_units",
          "conversion",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at"
        ]
      },
      "ReadVouchers": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_type_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_number_series": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "effective_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reference_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_month": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "voucher_year": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "financial_year": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "party_name_snapshot": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_ledger_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_mailing_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "registration_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_mailing_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "place_of_supply": {
            "type": [
              "string",
              "null"
            ]
          },
          "pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_invoice": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_optional": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_cancelled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_cost_centre": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cost_centre_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_entry_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_gst_class": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_level": {
            "type": [
              "string",
              "null"
            ]
          },
          "narration": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_note_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "dispatch_from_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_state_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_place": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_doc_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "type": [
              "string",
              "null"
            ]
          },
          "carrier_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "port_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_bill_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_bill_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "irn": {
            "type": [
              "string",
              "null"
            ]
          },
          "irn_ack_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "irn_ack_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "address": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Normalized address lines only; malformed source structures return null."
          },
          "buyer_address": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Normalized address lines only; malformed source structures return null."
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "voucher_kind",
          "voucher_status",
          "voucher_type_name",
          "voucher_type_id",
          "voucher_number",
          "voucher_number_series",
          "voucher_date",
          "effective_date",
          "reference_date",
          "reference",
          "order_reference",
          "voucher_month",
          "voucher_year",
          "financial_year",
          "party_id",
          "party_name_snapshot",
          "party_ledger_id",
          "party_mailing_name",
          "party_gstin",
          "registration_type",
          "consignee_name",
          "consignee_mailing_name",
          "consignee_gstin",
          "consignee_state",
          "consignee_country",
          "consignee_pin_code",
          "state",
          "country",
          "place_of_supply",
          "pin_code",
          "is_invoice",
          "is_optional",
          "is_cancelled",
          "is_cost_centre",
          "cost_centre_name",
          "voucher_entry_mode",
          "voucher_gst_class",
          "price_level",
          "narration",
          "delivery_note_no",
          "shipping_date",
          "dispatch_from_name",
          "dispatch_from_state_name",
          "dispatch_from_pin_code",
          "dispatch_from_place",
          "dispatch_doc_no",
          "destination",
          "carrier_name",
          "port_code",
          "shipping_bill_no",
          "shipping_bill_date",
          "irn",
          "irn_ack_no",
          "irn_ack_date",
          "address",
          "buyer_address",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at"
        ]
      },
      "ReadVoucherLines": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "line_no": {
            "type": [
              "integer",
              "null"
            ]
          },
          "line_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "stock_item_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "stock_item_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "hsn_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "taxable_value": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "unit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_deemed_positive": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_credit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cgst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "sgst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "igst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cess_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "batch_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "godown_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "actual_quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "billed_quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "discount_percent": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          }
        },
        "required": [
          "id",
          "voucher_id",
          "line_no",
          "line_kind",
          "stock_item_id",
          "stock_item_name",
          "account_id",
          "account_name",
          "description",
          "hsn_code",
          "quantity",
          "rate",
          "amount",
          "taxable_value",
          "tax_amount",
          "discount_amount",
          "unit_name",
          "is_deemed_positive",
          "is_credit",
          "created_at",
          "updated_at",
          "cgst_amount",
          "sgst_amount",
          "igst_amount",
          "cess_amount",
          "gst_rate",
          "batch_name",
          "godown_name",
          "actual_quantity",
          "billed_quantity",
          "discount_percent"
        ]
      },
      "ReadVoucherLedgerEntries": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "line_no": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ledger_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "is_deemed_positive": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_party_ledger": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "party_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "ledger_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "ledger_tax_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_debit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "currency_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "voucher_id",
          "line_no",
          "ledger_name",
          "account_id",
          "amount",
          "is_deemed_positive",
          "is_party_ledger",
          "created_at",
          "updated_at",
          "party_id",
          "ledger_type",
          "ledger_tax_type",
          "is_debit",
          "currency_code"
        ]
      },
      "ReadVoucherLineLedgers": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_line_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "line_no": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ledger_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "ledger_tax_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "ledger_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "currency_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_deemed_positive": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_debit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "voucher_id",
          "voucher_line_id",
          "line_no",
          "ledger_name",
          "account_id",
          "ledger_tax_type",
          "ledger_type",
          "amount",
          "currency_code",
          "is_deemed_positive",
          "is_debit",
          "created_at",
          "updated_at"
        ]
      },
      "ReadPartyGstRegistration": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "applicable_from": {
            "type": [
              "string",
              "null"
            ]
          },
          "registration_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "place_of_supply": {
            "type": [
              "string",
              "null"
            ]
          },
          "gstin": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "applicable_from",
          "registration_type",
          "state",
          "place_of_supply",
          "gstin"
        ]
      },
      "ReadCompanyGstRegistration": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "state_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "tally_guid",
          "name",
          "gstin",
          "state_name",
          "tax_type"
        ]
      },
      "ReadVoucherLineDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "line_no": {
            "type": [
              "integer",
              "null"
            ]
          },
          "line_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "stock_item_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "stock_item_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "hsn_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "taxable_value": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "unit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_deemed_positive": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_credit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cgst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "sgst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "igst_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "cess_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "gst_rate": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "batch_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "godown_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "actual_quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "billed_quantity": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "discount_percent": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "ledger_allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadVoucherLineLedgers"
            }
          }
        },
        "required": [
          "id",
          "voucher_id",
          "line_no",
          "line_kind",
          "stock_item_id",
          "stock_item_name",
          "account_id",
          "account_name",
          "description",
          "hsn_code",
          "quantity",
          "rate",
          "amount",
          "taxable_value",
          "tax_amount",
          "discount_amount",
          "unit_name",
          "is_deemed_positive",
          "is_credit",
          "created_at",
          "updated_at",
          "cgst_amount",
          "sgst_amount",
          "igst_amount",
          "cess_amount",
          "gst_rate",
          "batch_name",
          "godown_name",
          "actual_quantity",
          "billed_quantity",
          "discount_percent",
          "ledger_allocations"
        ]
      },
      "ReadLedgerSummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "currency_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "debit_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "credit_amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "unknown_direction_count": {
            "type": "integer",
            "minimum": 0
          },
          "missing_amount_count": {
            "type": "integer",
            "minimum": 0
          },
          "is_balanced": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "currency_code",
          "debit_amount",
          "credit_amount",
          "unknown_direction_count",
          "missing_amount_count",
          "is_balanced"
        ]
      },
      "ReadVoucherDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "voucher_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_type_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_type_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_number_series": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "effective_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reference_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_month": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "voucher_year": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "financial_year": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "party_name_snapshot": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_ledger_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_mailing_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "registration_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_mailing_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_gstin": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "consignee_pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "place_of_supply": {
            "type": [
              "string",
              "null"
            ]
          },
          "pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_invoice": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_optional": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_cancelled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_cost_centre": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cost_centre_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_entry_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "voucher_gst_class": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_level": {
            "type": [
              "string",
              "null"
            ]
          },
          "narration": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_note_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "dispatch_from_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_state_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_pin_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_from_place": {
            "type": [
              "string",
              "null"
            ]
          },
          "dispatch_doc_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "type": [
              "string",
              "null"
            ]
          },
          "carrier_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "port_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_bill_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_bill_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "irn": {
            "type": [
              "string",
              "null"
            ]
          },
          "irn_ack_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "irn_ack_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "address": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Normalized address lines only; malformed source structures return null."
          },
          "buyer_address": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Normalized address lines only; malformed source structures return null."
          },
          "tally_guid": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_master_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_alter_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$",
            "description": "Exact database numeric value encoded as a string; no read-side sign normalization."
          },
          "tally_remote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "synced_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadVoucherLineDetail"
            }
          },
          "ledger_entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadVoucherLedgerEntries"
            }
          },
          "ledger_summary": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadLedgerSummary"
            }
          }
        },
        "required": [
          "id",
          "voucher_kind",
          "voucher_status",
          "voucher_type_name",
          "voucher_type_id",
          "voucher_number",
          "voucher_number_series",
          "voucher_date",
          "effective_date",
          "reference_date",
          "reference",
          "order_reference",
          "voucher_month",
          "voucher_year",
          "financial_year",
          "party_id",
          "party_name_snapshot",
          "party_ledger_id",
          "party_mailing_name",
          "party_gstin",
          "registration_type",
          "consignee_name",
          "consignee_mailing_name",
          "consignee_gstin",
          "consignee_state",
          "consignee_country",
          "consignee_pin_code",
          "state",
          "country",
          "place_of_supply",
          "pin_code",
          "is_invoice",
          "is_optional",
          "is_cancelled",
          "is_cost_centre",
          "cost_centre_name",
          "voucher_entry_mode",
          "voucher_gst_class",
          "price_level",
          "narration",
          "delivery_note_no",
          "shipping_date",
          "dispatch_from_name",
          "dispatch_from_state_name",
          "dispatch_from_pin_code",
          "dispatch_from_place",
          "dispatch_doc_no",
          "destination",
          "carrier_name",
          "port_code",
          "shipping_bill_no",
          "shipping_bill_date",
          "irn",
          "irn_ack_no",
          "irn_ack_date",
          "address",
          "buyer_address",
          "tally_guid",
          "tally_master_id",
          "tally_alter_id",
          "tally_remote_id",
          "synced_at",
          "created_at",
          "updated_at",
          "lines",
          "ledger_entries",
          "ledger_summary"
        ]
      },
      "ReadCompany": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tally_company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReadCompanyProfiles"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "tally_company_name",
          "profile"
        ]
      },
      "ReadMeta": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "source": {
            "const": "synced"
          },
          "last_successful_sync_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "entity_coverage": {
            "type": "null"
          },
          "projection_version": {
            "const": "external-read-v2"
          },
          "unavailable_sections": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "bill_allocations": {
                "const": "not_synced"
              },
              "bank_allocations": {
                "const": "not_synced"
              },
              "cost_centre_allocations": {
                "const": "not_synced"
              },
              "eway_bill_details": {
                "const": "not_normalized"
              },
              "current_stock": {
                "const": "not_synced"
              },
              "stock_valuation": {
                "const": "not_synced"
              }
            },
            "required": [
              "bill_allocations",
              "bank_allocations",
              "cost_centre_allocations",
              "eway_bill_details",
              "current_stock",
              "stock_valuation"
            ]
          }
        },
        "required": [
          "source",
          "last_successful_sync_at",
          "entity_coverage",
          "projection_version",
          "unavailable_sections"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://connect.poysa.de"
    }
  ],
  "x-traffic-policy": {
    "status": "implemented; deployment and pilot pending",
    "edge_ip_per_minute": 300,
    "credential_digest_per_minute": 300,
    "integration_per_minute": {
      "reads": 120,
      "validation": 60,
      "operation_polling": 120,
      "connection": 20
    },
    "company_token_buckets": {
      "read_units": 240,
      "validation": 60,
      "create": 30,
      "operation_polling": 120,
      "connection": 20
    },
    "description": "Company buckets start full, refill continuously at the listed per-minute rate, and persist across restarts. Native edge/integration limits are approximate abuse controls. Read cost: company/master detail=1, voucher detail=4, master list=ceil(limit/50), voucher list=2*ceil(limit/50). Budgets apply on cache hits. Existing shared write limits also apply. No exact billing quota is promised."
  }
}
