This object captures the status and timestamp of the most recent preview for a payroll.
{
"status": "succeeded",
"started_at": "2019-06-29T18:26:56.848920Z",
"messages": []
}Before a payroll has been previewed, the preview object will be null. Then once a payroll has been initiated, it will be populated with a started_at timestamp and one of three statuses:
| Status | Description |
|---|---|
calculating | The payroll preview is still being calculated. This status is only applicable when previewing the payroll asynchronously. |
succeeded | The payroll preview was successful. Taxes, benefits, and deduction amounts can be viewed on the payroll items associated with the payroll. |
failed | The payroll preview was unsuccessful. |
The preview object also includes a messages field, which is an array of message objects. Each message has a text field containing a human-readable string and a type field indicating the severity. Messages provide additional context about the preview result, such as warnings about missing data or informational notes about calculations. The messages array will be empty if there are no messages to report.
If at any point after a preview is initiated the payroll or any associated payroll items or contractor payments are modified, then the preview will again become null. This indicates that the most recent preview calculation is no longer valid, and the payroll must be previewed again.

