SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Receipts

POST

Upload A Document

Add a receipt, bill or invoice from a file: PDF, JPEG, PNG, HEIC or WebP, up to 15 MB. It's read like a receipt emailed to Solarium and lands in review as a draft. Previews by default. On the free plan it counts toward the year's receipts, and past them the file is kept and read when the business upgrades. A bank or card statement is sent with kind statement. It's kept as a PDF without being read as a receipt, and it doesn't count toward the free plan.

Parameters

organizationIdUUID!required

Organization ID

nameString!required

"upload_document"

params.filenameString

The file's name, like receipt.pdf. Needed unless you pass gmail_message_id

params.content_base64String

The file's bytes, base64 encoded (or pass url)

params.gmail_message_idString

A message in the business's connected Gmail, instead of a file. Its attachments are added, or with none the email itself as a PDF. Refused when Gmail isn't connected or the message isn't there

params.urlString

A public https link to the file. Links to private networks are refused

params.noteString

Anything to remember about it, kept on the receipt

params.kindString

receipt (the default) or statement

params.account_idUUID

For a statement, the bank or card it's for

applyBoolean

true to add it

Request
mutation {
  runOp(
    organizationId: "a1b2c3d4-..."
    name: "upload_document"
    apply: true
    params: { filename: "staples.pdf", url: "https://files.example.com/staples.pdf" }
  ) { success applied result }
}
Response
{
  "data": {
    "runOp": {
      "success": true,
      "applied": true,
      "result": {
        "summary": "Added staples.pdf: Staples 42.50.",
        "data": {
          "filename": "staples.pdf",
          "receipts": [
            { "receipt_id": "c3d4e5f6-...", "vendor": "Staples", "amount": "42.50", "date": "2026-10-28", "status": "draft", "event_id": null }
          ]
        }
      }
    }
  }
}