Thank you for your post! Hopefully I can help you out here.
For this URL, you need to replace :year with the year you would like to query, e.g. https://api.freeagent.com/v2/payroll/2022, and for the second query, you need to replace both :year and :period, for example if you want details of the first payroll period in the year 2022, you would use the URL https://api.freeagent.com/v2/payroll/2022/0