Preview the accounting period from Companies House

POSThttps://app.speybooks.com/api/v1/organisation/accounting-period/preview

Preview the accounting period for a Companies House number without writing anything. This is the read side of the confirm step: it returns the looked-up identity and registered office for the user to confirm against, alongside the derived accounting period, so a valid but wrong number (one that passes the format check and resolves to a real but different company) is caught before anything is set.

The settable flag reports whether the period can still be set: true only while no activity has been recorded, the same condition the set endpoint enforces before it writes. When settable is false the organisation has posted activity and the period is fixed, so the confirm action should not be offered.

Companies House failures mirror the set endpoint: company_not_found (404), company_not_active (422), companies_house_unavailable (503), and invalid_company_number (400) for a malformed number that never reaches Companies House.

Body parameters

companyNumberstringrequired
Companies House number to look up and preview (e.g. SC889983). Nothing is written.

Response

200The looked-up identity, registered office, and derived period, with a settable flag.
Show response fields
accountingReferenceDateobject
Show child attributes
dayinteger
monthinteger
companyNamestring
companyNumberstring
companyStatusstring
entityTypestring
incorporationDatestring
periodobject
Show child attributes
yearEndstring
yearStartstring
periodSourcestring
registeredOfficeobject
Show child attributes
addressLine1string
countrystring
localitystring
postalCodestring
settableboolean
typestring

Error codes

400The company number is malformed.
404Companies House has no record of that number.
422The company is not active at Companies House.
503Companies House could not be reached.