Archive a unit
Archives a unit: it leaves lists, search and pickers while every record it owns is kept and it stays readable by id. Reversible via the unarchive action, and NOT a deletion. Idempotent: archiving an already-archived unit returns its current state.
Archives a unit: it leaves lists, search and pickers while every record it owns is kept and it stays readable by id. Reversible via the unarchive action, and NOT a deletion. Idempotent: archiving an already-archived unit returns its current state.
Present an API key (sb_live_… / sb_test_…), an OAuth2 access token, or a static token as a Bearer credential. The operator is implied by the credential; it is never in the path. Only a SHA-256 hash of an API key is stored server-side.
In: header
Path Parameters
UUIDv7 identifier of the resource.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/units/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive"{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "unit", "site_id": "72771e6a-6f5e-4de4-a5b9-1266c4197811", "unit_type_id": "09feeea8-7692-422e-90f1-4a851084cb1a", "name": "string", "status": "available", "floor": "string", "building": "string", "list_price_minor": 0, "currency": "str", "attributes": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z", "rateable_value_minor": 0, "assessor_reference": "string" }}{ "error": { "code": "unauthorized", "message": "Missing or invalid credential." }}{ "error": { "code": "insufficient_scope", "message": "The credential lacks a scope required by this endpoint." }}{ "error": { "code": "not_found", "message": "Resource not found." }}{ "error": { "code": "conflict", "message": "The request conflicts with current resource state." }}{ "error": { "code": "rate_limited", "message": "Rate limit exceeded. Retry after 7s." }}{ "error": { "code": "validation_error", "message": "string", "details": [ { "field": "string", "issue": "string" } ] }}Void an invoice POST
Voids an invoice nobody has paid. A draft or open invoice can be voided; an overdue one can be voided once StoreBay has switched overdue voids on for the operator (until then it is refused `409` with "Only a draft or open invoice can be voided."). Refused `409`, each with its own sentence, and `details[0].issue` naming which (`invoice_part_paid`, `invoice_money_against_it`, `invoice_credit_note_against_it`, `invoice_written_off`, `invoice_debt_in_sale`, `invoice_collection_in_flight`, `invoice_shop_sale`, `invoice_not_voidable`): an invoice with money against it (including a part-payment) or a credit note issued or applied against it, whose debt was written off or is part of a sale of goods, with a collection still with the provider, or that is a Shop sale's invoice. Voiding an invoice that is already void answers `200` with the invoice and changes nothing. The status becomes `void` and nothing else on the invoice moves: `amount_due_minor` still reads what was due when it was voided, and nothing is owed. In the same transaction the void closes the customer's arrears case (and requests an unlock of its unit) when nothing overdue is left, and otherwise refreshes its amount; withdraws the reminder emails still waiting to go; closes the invoice's failed collection attempts and cancels their card payments; cancels a refundable deposit that was never paid; reverses the invoice in the connected accounting package; and puts the charges the invoice carried back on the plan's next invoice, unless the plan has ended. It sends no email to the customer. `409` with `code` `invoice_busy` means another writer held something the void needed: try again in a moment.
Create a site POST
Next Page