Openapi
The invoice's lifecycle: the pinned workflow version, the current stage, the stage history, and what the lifecycle waits on now. `lifecycle` is null when no lifecycle run started for the invoice.
sb-auth-token<token>Supabase browser session cookie. Supabase may split larger session values into chunked cookies like sb-auth-token.0.
invoiceId*stringuuidorganizationId*stringuuidReturns the invoice's lifecycle.
application/jsondefinition*|nullevents*array<>lifecycle*|nullwaiting*|nullcurl -X GET 'https://app.localhost/api/v1/organizations/123/invoices/123/lifecycle'{ "definition": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "name": "string", "source": "organization", "version": 1 }, "events": [ { "actorCustomerContactId": "8aa2493d-ff94-493c-a526-3b6545634aa5", "actorUserId": "94141e08-adc7-44ce-bed3-45f031b9f36f", "clearedAt": "string", "createdAt": "string", "display": "main", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "lifecycleId": "5891c413-dc1b-4537-93e7-c596d1ff97f4", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "outcome": "progress", "reachedAt": "string", "runStepId": "af37afe8-9a44-46ca-b731-d8647529f365", "sourceRunId": "f56f10c5-743d-477c-a57d-2d752452e421", "stageKey": "string" } ], "lifecycle": { "createdAt": "string", "currentStageKey": "string", "definitionId": "058563fe-6949-46e9-9fb3-06a0e3a11f6a", "definitionVersion": 1, "endedAt": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9", "pauseReason": "string", "pausedAt": "string", "pausedBy": "71a37da7-85a0-4b55-9e2f-fc36d22f1e90", "pausedUntil": "string", "runId": "78c33d18-170c-44d3-a227-b3194f134f73", "startedAt": "string", "subjectId": "68460e63-0717-47f9-8fd8-d28f152cb30b", "subjectType": "invoice", "updatedAt": "string" }, "waiting": { "at": "string", "events": [ "string" ], "kind": "approval", "nextStageKey": "string", "nextStageLabel": "string" }}