Periods & Settings
API reference for assessment periods, user settings, and application configuration.
Periods#
Assessment periods are monthly time windows used for UC reporting and tax calculations.
List Periods#
const periods = await $fetch('https://taxmtd.uk/api/periods')
// Returns: Array<{ id, label, startDate, endDate, createdAt }>Create Period#
const period = await $fetch('https://taxmtd.uk/api/periods', {
method: 'POST',
body: {
label: 'March 2026',
startDate: '2026-02-28',
endDate: '2026-03-27'
}
})Update Period#
await $fetch('https://taxmtd.uk/api/periods', {
method: 'PUT',
body: { id: 1, label: 'March 2026 (updated)' }
})Delete Period#
await $fetch('https://taxmtd.uk/api/periods', {
method: 'DELETE',
body: { id: 1 }
})const settings = await $fetch('https://taxmtd.uk/api/settings')
// Returns: { businessName, businessAddress, vatNumber, nino, ... }Update Settings#
await $fetch('https://taxmtd.uk/api/settings', {
method: 'POST',
body: {
businessName: 'John Doe Consulting',
businessAddress: '123 High Street, London',
vatNumber: 'GB123456789',
defaultVatRate: 20
}
})