# Classify Transaction

> Solarium docs, Transactions. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Assigns classification data to a staged ledger event. Supports three modes: intent (category + payment, server builds the balanced lines — with optional single or multi-component tax), transfer (two owned accounts, no category), and raw (client sends pre-built double-entry lines). This is the primary way to prepare a transaction for confirmation.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `eventId` | `UUID!` | Yes | Ledger event ID to classify |
| `categoryId` | `UUID` | No | Intent mode: expense or income account ID |
| `paymentId` | `UUID` | No | Intent mode: bank/credit card payment account ID |
| `taxAmount` | `String` | No | Single-tax: tax portion of the amount (e.g. HST/GST) |
| `taxAccountId` | `UUID` | No | Single-tax: tax liability account ID (e.g. HST Payable) |
| `taxCode` | `String` | No | Single-tax: tax code identifier (e.g. HST_ON, GST, exempt) |
| `taxComponents` | `JSONString` | No | Multi-tax: array of { sales_tax_code, amount } (e.g. GST + PST). Amounts are used as-is; the server resolves each component's account. Overrides taxAmount/taxCode. |
| `fromAccountId` | `UUID` | No | Transfer mode: the owned account money moves out of |
| `toAccountId` | `UUID` | No | Transfer mode: the owned account money moves into |
| `accounts` | `JSONString` | No | Raw mode: pre-built balanced lines — array of { account_id, debit, credit, description, sales_tax_code }. Must balance (total debits = total credits). |
| `qbObjectType` | `String` | No | Raw mode: the QuickBooks object type the lines represent (e.g. journal_entry, purchase, deposit). |

### Request

```graphql
mutation {
  updateStagedEntry(
    organizationId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    eventId: "c8d9e0f1-a2b3-4567-c890-def012345678"
    categoryId: "f5a6b7c8-d9e0-1234-5678-9abcdef01234"
    paymentId: "e4f5a6b7-c8d9-0123-ef01-23456789abcd"
    taxAmount: "1.93"
    taxAccountId: "a0b1c2d3-e4f5-6789-0abc-def123456789"
    taxCode: "HST_ON"
  ) {
    success
  }
}
```

### Response

```json
{
  "data": {
    "updateStagedEntry": {
      "success": true
    }
  }
}
```
