# Statuses

Each worker of a gig has a `status`. It is our public contract and does not change when our
internal processes do.

| Status | Meaning |
|---|---|
| `awaiting_worker` | The worker has not accepted the connection yet; the invitation has been sent. |
| `received` | The invoicing request exists and is being handled. |
| `invoiced` | The invoice has been sent to you. `invoice` carries the number, reference number, due date, total and IBAN. |
| `paid` | You have paid the invoice. |
| `completed` | The worker's salary has been paid out. |
| `declined` | The worker declined the connection (`worker_declined`). |
| `expired` | The invitation expired after 30 days (`invitation_expired`). Post the connection again to re-invite. |
| `cancelled` | Cancelled: `gig_cancelled`, `connection_revoked`, `invoice_cancelled`, `invoice_credited`, `invoice_deleted`. |
| `rejected` | Keikkalasku could not create the invoice: `account_closed`, `account_disabled`, `partner_suspended`. |

`status_reason` explains the last four. A cancellation that came too late (the invoice had already
been sent) keeps the worker's real status with `status_reason: cancellation_refused`.

Statuses are updated within about a minute. You never see net salaries, taxes or deductions.

Connections have their own statuses: `pending`, `active`, `declined`, `expired` (30 days), `revoked`.
