# Enter A Supplier Bill

> 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

An unpaid supplier invoice, owed through Accounts Payable (DR each category, DR the input tax credit, CR Accounts Payable). With QuickBooks connected it becomes a Bill with the invoice number and due date, paid later through Pay Bills. Refuses if Solarium or QuickBooks already has a bill for that vendor and invoice number. An expense already booked to Accounts Payable also goes to QuickBooks as a Bill when it's pushed.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `name` | `String!` | Yes | "create_bill" |
| `params.vendor` | `String!` | Yes | Who the invoice is from |
| `params.date` | `Date!` | Yes | The invoice date |
| `params.due_date` | `Date` | No | When it's due |
| `params.doc_number` | `String` | No | The vendor's invoice number |
| `params.lines` | `[Object!]!` | Yes | Each: category_id, amount (before tax), tax_amount, description |
| `params.tax_code` | `String` | No | hst, gst, pst or qst, when a line is taxed |
| `params.ap_account_id` | `String` | No | Defaults to the business's Accounts Payable |
| `params.receipt_id` | `String` | No | The invoice's receipt, attached to the bill |
| `apply` | `Boolean` | No | true to book it |

### Request

```graphql
mutation {
  runOp(organizationId: "a1b2c3d4-...", name: "create_bill", apply: true, params: {
    vendor: "Drapes Digital", date: "2026-10-08", due_date: "2026-11-07", doc_number: "DRAPESINC-0021",
    lines: [{ category_id: "c3d4...", amount: "1500.00", tax_amount: "195.00" }], tax_code: "hst"
  }) { success applied result }
}
```

### Response

```json
{
  "data": {
    "runOp": {
      "success": true,
      "applied": true,
      "result": {
        "summary": "Bill From Drapes Digital Invoice DRAPESINC-0021: 1695.00, Tax 195.00 (Due 2026-11-07)",
        "data": { "doc_number": "DRAPESINC-0021", "due_date": "2026-11-07", "tax": "195.00" }
      }
    }
  }
}
```
