# Period Updates

A **period update** brings a fund's accounts up to date to a chosen date. It is part of the
year-end process, but it can also be run part-way through a financial year when balances need
to be confirmed and investments revalued, for example before starting a pension or paying a
lump sum.
When a period update runs, Class:
- posts depreciation expense from the depreciation worksheet
- completes any outstanding parcel matching
- calculates profit or loss on investment disposals
- revalues the fund's investments
- posts income tax expense
- allocates benefits to members or beneficiaries
- updates the investment, member, fund and tax registers.

For the full product explanation, see
[Period Update](https://support.class.com.au/hc/en-au/articles/360001382755-Period-Update).


---

**Period updates run in the background**
**New period update** and **Roll back period update** return `200` as soon as the work has
been accepted and queued, not when it has finished. Use **Period update detail** to follow
progress until `ProcessingStatus` reaches a final value.
| Operation | Status when accepted | Final status |
|  --- | --- | --- |
| **New period update** | `Initial` | `Processed`, or `Errored` if processing failed |
| **Roll back period update** | Usually `Cancelling` (see below) | `Cancelled` |

`Initial` covers both waiting in the queue and processing. There is no separate in-progress
status.
Straight after a rollback is accepted, the period update can still show `Processed` for a
short time before it changes to `Cancelling`. After a rollback, only `Cancelled` means it has
finished.
**Running a period update, in this order**
1. **Period updates**
: list the fund's period updates. A new period update starts the day

after the fund's latest active period update ends or, if the fund has none, on the fund's

start date. Its
`PeriodEndDate`
 must be later than the end of the latest active period

update.
2. **New period update**
: send the
`PeriodEndDate`
 and a
`Description`
. Class works out the

start date and financial year. Keep the returned
`PeriodUpdateId`
.
3. **Period update detail**
: poll with the
`PeriodUpdateId`
 at a modest interval until
`ProcessingStatus`
 is
`Processed`
 or
`Errored`
. When it is

`Errored`
,
`Messages`
 explains what went wrong.

Run one period update at a time for each fund. Do not send **New period update** while the
fund's latest period update is still `Initial` or `Cancelling`.
**Rolling back**
Only the fund's latest active period update can be rolled back, and only once it has finished
processing. To roll back several, start with the most recent and work backwards, waiting for
each to reach `Cancelled`. Class's own rollback rules also apply, and a rollback they reject
returns `400` with the reason in `Errors`.
**Adjusting tax provisions**
Once a period update is `Processed`, **Adjust tax provisions** sets its fund-level provision
for income tax and provision for deferred tax, the same adjustment as saving the Fund Tax
Expense screen in Class. The change is saved straight away, so there is nothing to poll. Only
the fund's latest active period update can be adjusted, and not once its financial year has
been tax finalised or closed.
**Which funds are supported**
Super funds (SMSF and SAF) and other entity types (Personal, Trust, Company and Partnership)
are supported. Consolidated entities are rejected on every operation with
`API_INVALID_FUND_TYPE`. A fund that is not Active can still be read, but period updates
cannot be created or rolled back on it.
ServersPartner Integration Environment (Sandbox)https://api.class-pie.com.au/api/1.0Production Environmenthttps://api.class.com.au/api/1.0

Version: 1.0

Metadata:
  - apiId: Class Partner v1
  - tags: ["Class Partner"]

## Servers

Partner Integration Environment (Sandbox)
```
https://api.class-pie.com.au/api/1.0
```

Production Environment
```
https://api.class.com.au/api/1.0
```

## Security

### Class_oAuth

Class uses OAuth2 and OpenID for authentication and authorisation. The resource owner password credentials and authorization code flows are supported.

Type: oauth2
Token URL: https://app.class-pie.com.au/connect/token
Scopes:
- `fund.details.read`: View basic fund details
- `fund.maintain`: View and maintain all fund information

## Download OpenAPI description

 - [Period Updates](https://developer.myhub.com.au/_bundle/products/class/apis/partner/period-updates.yaml)

## Fund

 - [GET /f/{businessCode}/{fundCode}/period-updates](https://developer.myhub.com.au/products/class/apis/partner/period-updates/fund/getallperiodupdates.md): Returns the fund's active period updates. The response is unpaginated. **Which period updates are included.** When `year` is omitted, period updates in every financial year that is not closed are retu
 - [POST /f/{businessCode}/{fundCode}/period-updates](https://developer.myhub.com.au/products/class/apis/partner/period-updates/fund/createperiodupdate.md): Starts a new period update for the fund, ending on `PeriodEndDate`. Class works out the start date (the day after the fund's latest active period update ends, or the fund's start date if it has none)
 - [GET /f/{businessCode}/{fundCode}/period-updates/{periodUpdateId}](https://developer.myhub.com.au/products/class/apis/partner/period-updates/fund/getperiodupdatebyid.md): Returns one period update. Use this to follow a period update after **New period update** or **Roll back period update** until `ProcessingStatus` reaches a final value. Unlike **Period updates**, this
 - [DELETE /f/{businessCode}/{fundCode}/period-updates/{periodUpdateId}](https://developer.myhub.com.au/products/class/apis/partner/period-updates/fund/rollbackperiodupdate.md): Rolls back a period update, reversing what it posted. This is the API equivalent of **Rollback** on the Period Updates screen in Class. **A `200` means the rollback was accepted and queued, not that i
 - [PATCH /f/{businessCode}/{fundCode}/period-updates/{periodUpdateId}/income-tax](https://developer.myhub.com.au/products/class/apis/partner/period-updates/fund/adjustperiodupdatetaxprovisions.md): Sets the fund-level provision for income tax and provision for deferred tax on a period update. This is the API equivalent of saving the Fund Tax Expense screen in Class, including its downstream effe
## Errors and warnings

