# Payroll Simulation Request Headers

The BrightPay API can be switched into simulation mode to return predictable data for testing purposes. In this mode the BrightPay API does not request data from the database but instead returns mocked data. This can help with scenario testing (especially around the turn of the financial year).

To switch the API into simulation mode headers can be added to the request as below:

<table data-full-width="false"><thead><tr><th width="278.3333333333333">Header Name</th><th width="239">Description</th><th>Methods Simulated</th></tr></thead><tbody><tr><td>SimulationMode</td><td><p>Should be set to <strong>true</strong> or <strong>false</strong>.</p><p></p><p>If set to "true" the Payroll API is switched into simulation mode.</p></td><td>GetEmployers, GetEmployerHourlyRates, GetEmployees, CreateEmployeeHourlyPayments</td></tr><tr><td>SimulationScenario</td><td><p>Should be set to <strong>SCENARIO1</strong>, <strong>SCENARIO2</strong>, <strong>SCENARIO3</strong> or <strong>SCENARIO4.</strong></p><p></p><p>Returns data for various testing scenarios that are described in the section <a href="payroll-simulation-scenarios">Payroll Simulation Scenarios</a></p></td><td>GetEmployers, GetEmployerHourlyRates, GetEmployees</td></tr><tr><td>SimulationModeDate</td><td><p>Should be set to a <strong>date.</strong></p><p></p><p>This allows you to simulate dates at various points in the year by telling the API to behave as if the SimulationModeDate is the actual date. This is useful for end of financial year testing. </p></td><td>GetEmployers, GetEmployerHourlyRates, GetEmployees</td></tr><tr><td>SimulationForcedError</td><td><p>Should be set to <strong>true</strong> or <strong>false</strong>.</p><p></p><p>This forces a handled error to occur. An issue has occurred, the API understands the issue and returns a response with a meaningful error code.</p></td><td>GetEmployerHourlyRates, CreateEmployeeHourlyPayments</td></tr><tr><td>SimulationForcedException</td><td><p>Should be set to <strong>true</strong> or <strong>false</strong>.</p><p></p><p>This forces an unhandled error to occur. An issue has occurred, the API responds with a general error code and an errorId.</p></td><td>GetEmployerHourlyRates, CreateEmployeeHourlyPayments</td></tr></tbody></table>

For example, to return simulation data add the following http headers to your requests

* SimulationMode = true
* SimulationScenario= "Scenario1" (or "Scenario2", "Scenario4", "Scenario5")
* SimulationModeDate= for example&#x20;
  * 01/02/2025 for data connected to BrightPay 24/25
  * 01/04/2025 for data connected to BrightPay 24/25 and 25/26
  * 01/08/2024 for data connected to BrightPay 25/26
