API ReferenceInvoice
invoice.create
Type: Mutation · Auth: Workspace-aware
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| customerId | string | Yes | — | ID of the associated customer |
| invoiceNumber | string | Yes | — | Invoice number |
| workOrderId | string | No | — | ID of the associated work order |
| projectId | string | No | — | ID of the associated project |
| maintenancePlanId | string | No | — | ID of the associated maintenance plan |
| quoteId | string | No | — | ID of the associated quote |
| monitoringAccountId | string | No | — | ID of the associated monitoring account |
| status | enum(draft, pending_approval, approved, sent, partially_paid, paid, overdue, void, canceled) | Yes | "draft" | Status |
| issueDate | string.date-time | No | — | Issue date |
| dueDate | string.date-time | No | — | Due date |
| subtotal | unknown | No | — | Subtotal |
| taxAmount | unknown | No | — | Tax amount |
| totalAmount | unknown | No | — | Total amount |
| amountPaid | unknown | No | — | Amount paid |
| stripeCustomerId | string | No | — | ID of the associated stripe customer |
| contactId | string | No | — | ID of the associated contact |
| sentAt | unknown | No | — | Sent at |
| viewedAt | unknown | No | — | Viewed at |
| pdfS3Key | unknown | No | — | Pdf s3key |
| personalMessage | unknown | No | — | Personal message |
| stripePaymentIntentId | unknown | No | — | ID of the associated stripe payment intent |
| stripeCheckoutSessionId | unknown | No | — | ID of the associated stripe checkout session |
| paymentUrl | unknown | No | — | Payment url |
| notes | string | No | — | Notes |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Example
{
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"invoiceNumber": "example",
"workOrderId": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"maintenancePlanId": "550e8400-e29b-41d4-a716-446655440000",
"quoteId": "550e8400-e29b-41d4-a716-446655440000",
"status": "draft",
"visibilityMode": "global"
}