Portfolio

Replace the whole portfolio

Clears the signed-in owner’s rows and writes the body in their place, in one transaction. This is here for the worked example, putting it away, resetting it or loading it into a team that holds nothing yet, and nothing else: a normal edit is POST /portfolio/changes. Only an owner of the team may call it, and a portfolio that holds the owner’s own records is never replaced. Every collection has to be named, and one you send empty is emptied: a replace is a replace, but an omission is a mistake and is refused rather than acted on. The body names the schema it was built against for the same reason. Every row is written at rev 1, whatever revision it arrived carrying, so the next GET /portfolio hands back rows a client can edit from.

put/api/v1/portfolio

Request

  • Base URL: http://localhost:5180
  • URL: http://localhost:5180/api/v1/portfolio
  • Auth: API key in cookie better-auth.session_token

Request body

bankAccountsobject required
bankFeedsobject required
statementImportsobject required
buildingsobject required
unitsobject required
metersobject required
meterReadingsobject required
keySetsobject required
inventoryItemsobject required
contactsobject required
contractorsobject required
leasesobject required
leaseTemplatesobject required
leaseClausesobject required
depositsobject required
inspectionsobject required
applicationsobject required
viewingsobject required
listingsobject required
invoicesobject required
paymentsobject required
bankTransactionsobject required
reconciliationMatchesobject required
arrearsCasesobject required
paymentPlansobject required
expensesobject required
supplierInvoicesobject required
mortgagesobject required
serviceChargePeriodsobject required
budgetsobject required
issuesobject required
workOrdersobject required
quotesobject required
maintenancePlansobject required
certificatesobject required
mailboxesobject required
mailAliasesobject required
threadsobject required
messagesobject required
callsobject required
templatesobject required
workflowsobject required
workflowRunsobject required
approvalRequestsobject required
auditEventsobject required
tasksobject required
notificationsobject required
channelConnectionsobject required
bookingsobject required
cleaningTasksobject required
pricingRulesobject required
reviewsobject required
documentsobject required
documentFoldersobject required
equipmentobject required
insurancePoliciesobject required
reportsobject required
savedViewsobject required
customSectionsobject required
jurisdictionsobject required
jurisdictionOverridesobject required
schemaVersioninteger required

The schema the client was built against, as GET /portfolio reports it (currently 10). Required, and any other value is refused: a collection this build does not know about is one a replace would empty.

settingsobject required

The whole settings block, in the AppSettings shape GET /settings documents. A field the spec does not list yet is kept.

Response

The portfolio was replaced.

okunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.