API

Stoopfix API

A small JSON API for property managers. It covers your locations, units and repair requests, with their messages, visit times, costs and maintenance records, plus your team, vendors and reports, and webhooks for live updates. Everything you can do with it, you can also do in the app.

Getting a key

Log in, open API in the sidebar and create a key. You’ll see it once, so copy it somewhere safe. You can have up to five and delete any of them at any time.

Send the key with every call:

curl "https://your-stoop-address/api/requests" \
  -H "Authorization: Bearer stoop_your_key"

Requests

GET/api/requests

Your requests, newest first (up to 500). Add ?status= with open, scheduled, in_progress, waiting (for parts) or done to filter.

{
  "requests": [{
    "id": "8f1c…",
    "unit_id": "a41e…",
    "unit_label": "Apt 4B",
    "tenant_name": "Sam",
    "category": "appliance",
    "description": "Dishwasher won’t drain",
    "status": "open",
    "photo_count": 2,
    "location_id": "5d20…",
    "location_name": "Maple Court",
    "assignee_id": "c7b9…",
    "assignee_name": "Tess Wu",
    "scheduled_at": 1795400000,
    "due_at": null,
    "cost_cents": 8990,
    "created_at": 1795300000,
    "updated_at": 1795300000
  }]
}

POST/api/requests

Open a request for a unit yourself. It is assigned by trade like any other, and the tenant is notified.

{ "unit_id": "a41e…", "category": "plumbing", "description": "Replace the kitchen tap washer" }

Categories: appliance, plumbing, electrical, heating_cooling, doors_windows, pests, other.

PATCH/api/requests/:id

Change the status, who is on it, or when the visit is. Send only the fields you want to change. The tenant is emailed when the status changes.

FieldWhat it does
statusopen, scheduled, in_progress, waiting or done.
assignee_idA technician’s id from GET /api/technicians, or null to take everyone off it.
scheduled_atWhen the visit starts, in Unix seconds, or null to clear it. An open request becomes scheduled. You get a 409 if that technician is already booked within the hour.
tzOptional IANA time zone, such as America/Chicago, used when the time is written out in emails.
curl -X PATCH "https://your-stoop-address/api/requests/8f1c…" \
  -H "Authorization: Bearer stoop_your_key" \
  -H "Content-Type: application/json" \
  -d '{"status": "in_progress"}'

GET/api/requests/:id/photos

The photos on a request (up to eight), added by the tenant or by your team. Fetch one as an image from /api/requests/:id/photos/:photoId. To add one, POST the image bytes to /api/requests/:id/photos with its Content-Type.

GET/api/requests/:id/messages

The conversation between you and the tenant on one request, oldest first. author is manager or tenant.

POST/api/requests/:id/messages

Send the tenant a message. They are emailed.

{ "body": "Plumber can come Tuesday at 9. Does that work?" }

POST/api/requests/:id/forward

Email the task to a contractor: unit, description, photo and your note. Replies go to your email. A private note records who it was sent to.

{ "email": "plumber@example.com", "note": "Key is in the lockbox." }

Each request also carries assignee_id, assignee_name (the technician working it, if any), cost_cents (the total logged against it), and for planned maintenance due_at.

PATCH/api/requests/:id

Besides status, send assignee_id to hand the task to someone on your team, or null to unassign it. The technician is emailed. New requests are assigned automatically to the active technician certified for that category with the fewest unfinished tasks.

GET/api/requests/:id/costs

The cost lines on a task: description, amount_cents and vendor_name.

POST/api/requests/:id/costs

Log a cost: either one amount in dollars, or a qty at a rate (the quantity can be a fraction, such as 1.5 hours). Each cost comes back with qty, unit_cents and amount_cents.

{ "description": "Drain pump", "amount": 89.90 }

POST/api/requests/:id/ready-to-invoice

Marks a task ready to be invoiced, which is how someone who does the work hands it to whoever bills. It answers 409 while any part is still on the way. Send { "on": false } to take it back, as long as there is no invoice yet. Marked tasks carry billable 1 in GET /api/requests.

GET/api/requests/:id/time

The clock on a task: every stretch of time someone logged (name, started_at, stopped_at), the total_seconds, and running_since if your own clock is running there.

POST/api/requests/:id/time/start

Starts your clock on the task. A clock you had running on another task is stopped: one person, one task at a time. Marking a task done stops every clock on it, and a clock left running is stopped after 12 hours.

POST/api/requests/:id/time/stop

Stops your clock on the task.

PUT/api/requests/:id/costs/order

Set the order of a task’s cost lines. Send every cost id, top to bottom, as ids. GET …/costs returns them in that order, and an invoice built from the costs keeps it.

GET/api/price-items

Your saved items: labor rates, parts and standard repairs, each with name and price_cents.

POST/api/price-items

Save an item. price is in dollars. Saving a name you already have updates its price.

{ "name": "Labor (per hour)", "price": 85 }

DELETE/api/price-items/:id

Removes a saved item. Invoices and costs that already used it are not changed.

POST/api/requests/:id/decline

Close a request without doing the work. Send a reason; the tenant is emailed it. The request comes back with status done, closed_as declined and your close_reason. A tenant can also withdraw their own request, which sets closed_as to withdrawn. Changing the status reopens it.

GET/api/requests/:id/parts

The parts a task is waiting on. Each is requested, ordered or received, with its quote and the time of each step.

POST/api/requests/:id/parts

Ask for a part. Only name is required. A task that isn’t finished moves to waiting.

{ "name": "Sink trap", "qty": 1, "supplier": "Drain Bros", "quote": 89.90 }

PATCH/api/requests/:id/parts/:partId

Send status to move it along, or quote and supplier to record the price. When a part is received its quote is added to the task’s costs, and when the last one is in a waiting task returns to in_progress.

GET/api/units/:id/records

The unit’s maintenance record, newest first. Finishing a request adds an entry automatically, with its total cost.

POST/api/units/:id/records

Add an entry by hand: body, and optionally cost in dollars.

Billing a task

Amounts you send (price, amount) are in dollars. Amounts you get back end in _cents. Percentages are sent as numbers such as 8.25 and come back in hundredths of a percent as _bp (825).

The usual order:

  1. Log what the task cost with POST /api/requests/:id/costs. Parts marked received are added for you.
  2. Save a draft invoice with PUT /api/requests/:id/invoice. Nothing is sent.
  3. Optionally get the tenant’s approval with POST /api/requests/:id/signoff/ask.
  4. Send it with POST /api/requests/:id/invoice/send. The tenant is emailed.
  5. Follow it with GET /api/invoices, nudge with …/invoice/remind, and record money with …/invoice/paid.

GET/api/invoices

Every invoice on the account that isn’t cancelled, newest first. What is still owed on one is total_cents - paid_cents; how late it is comes from due_at and the now the response carries.

{
  "now": 1795300000,
  "invoices": [{ "id": "3be2…", "request_id": "8f1c…", "number": 12, "status": "sent",
                "total_cents": 19725, "paid_cents": 5000, "due_at": 1796509600,
                "sent_at": 1795300000, "reminded_at": null,
                "unit_label": "Apt 4B", "location_name": "Maple Court" }]
}

status is draft, sent or paid.

GET/api/requests/:id/invoice

The task’s invoice: invoice (or null), its lines, its payments (a refund is a negative amount), your account’s defaults for tax and the fee, and signed, whether the tenant has approved the work.

PUT/api/requests/:id/invoice

Create or replace the draft. Send 1 to 40 lines. tax and fee are percentages from 0 to 30; leave them out and a new draft takes your account’s defaults, while an existing draft keeps its own. Tax is charged on lines that are not marked "taxable": false. The fee is a percentage of the lines and is not taxed. A sent invoice can’t be edited: cancel it first.

{
  "lines": [{ "description": "Sink trap", "qty": 1, "price": 100 },
            { "description": "Labor", "price": 80, "taxable": false }],
  "tax": 8.25, "fee": 5, "fee_label": "Service fee"
}

The invoice comes back with subtotal_cents, charge_cents (the fee), tax_cents and total_cents.

POST/api/requests/:id/invoice/send

An invoice is made from a signed estimate. Saving a draft or sending answers 409 while the task has no estimate, while the estimate has not been signed, or once the job has grown past the amount signed for.

Numbers the invoice, sets it due in 14 days and emails the tenant. If your account holds invoices until the tenant has signed, this answers 409 until they have.

POST/api/requests/:id/invoice/paid

Record a payment. Leave amount out to settle everything still owed, or send less for a part payment; the invoice stays sent until it is paid in full.

{ "amount": 50, "how": "Cheque" }

POST/api/requests/:id/invoice/refund

Record money given back, up to what was paid. The invoice stays settled unless you send "reopen": true, which puts it back to sent (for a bounced cheque, say). If the invoice was paid by card through Stoopfix, the money goes back to that card through Stripe and the answer fails with 409 if Stripe refuses; send "to_card": false to record a refund you made another way. With QuickBooks connected, each payment is copied as a payment on the invoice, a refund as a refund receipt, and a reopening refund voids the payment it matches.

{ "amount": 20, "how": "Overcharged" }

POST/api/requests/:id/invoice/remind

Emails the tenant about a sent invoice, quoting what is still owed. At most once a day per invoice. Reminders also go out by themselves on the due date and a week later.

POST/api/requests/:id/invoice/void

Cancels a draft or a sent invoice with nothing paid on it. Refund any part payment first.

GET/api/invoice-settings

What new invoices start with: tax_bp, charge_label, charge_bp, and needs_signoff.

PUT/api/invoice-settings

Change them. needs_signoff holds every invoice until the tenant has signed for the work; tasks with no tenant are not held.

{ "tax": 8.25, "fee": 5, "fee_label": "Service fee", "needs_signoff": true }

Tenant go-ahead and approval

There are two signatures. The go-ahead comes before the work: the tenant agrees to it starting, and to an estimate if you gave one. The approval comes after: they confirm it was done. Each is signed once.

GET/api/requests/:id/go-ahead

Returns go_ahead (name, signed_at, via, the estimate_cents they agreed to and the pen strokes) or null, the current estimate_cents, asked_at, and required: whether your account holds work until it is signed.

One list per job. There is no separate estimate to keep in step. The estimate is the task’s costs (POST /api/requests/:id/costs) plus the quotes on parts asked for and not yet received, with your account’s tax and fee. When a part arrives its quote becomes a cost line, so the total does not change. GET …/go-ahead returns it as estimate: its lines (each marked on_order or not), subtotal_cents, tax_cents and total_cents, which is null while there is nothing to estimate and 0 for a repair the tenant is not charged for. over is true once the job has grown past what the tenant signed for.

PUT/api/requests/:id/go-ahead

Send { "free": true } for a repair the tenant is not charged for (the costs are still logged), or false to charge for it again.

Send discount to take money off the job: { "discount": { "kind": "pct", "value": 10 } } for ten percent, or "kind": "amt" with dollars. It comes off the lines before the fee and tax, and the invoice carries it. Only the account owner, or a manager with the discount permission, may send it; anyone else gets 403.

Fees are lines of their own. POST /api/requests/:id/fees with { "label": "Trip fee", "kind": "amt", "value": 25 } adds a flat fee, or "kind": "pct" a percentage of the lines; DELETE /api/requests/:id/fees/:feeId removes one. Whoever may bill can do both. Your account’s standing fee from Settings is listed first. The estimate returns them as fees (each with cents), and an invoice returns the same list as fees beside its lines.

Tax is the location’s own rate when it has one (tax on POST or PATCH /api/locations, as a percentage), and your account’s rate otherwise.

POST/api/requests/:id/go-ahead/ask

Sends the tenant a link to see every line and sign: by email, and as a message in the task’s chat. The link is /app#task-<id> and opens that task. Use it again when the job has grown past what they signed for, to get the new total signed. If the unit has no tenant email yet, a manager sends { "email": "tenant@example.com" } with it: the address is saved to the unit and the estimate goes out. The state’s reach says which case applies: ready, attach (the task is tied to the unit’s tenant as it is sent), add or none.

POST/api/requests/:id/go-ahead

Save a signature taken on your own device, in the same shape as the approval below.

With “get the tenant’s signed go-ahead before work starts” switched on (needs_go_ahead in PUT /api/invoice-settings), starting the clock, moving a task to in_progress, marking a part ordered or received, and sending an invoice for more than was signed for all answer 409 until the tenant has signed, and again whenever the job grows past what they signed for. Asking for a part and logging a cost are never held: that is how the estimate is built, and how a forgotten part is added. Planned maintenance and tasks with no tenant are not held.

Once a task is done, the tenant can sign to confirm the work.

GET/api/requests/:id/signoff

Returns signoff (name, signed_at, via, which is tenant or on_site, and the pen strokes) or null, plus asked_at.

POST/api/requests/:id/signoff/ask

Emails the tenant a link to sign from their own login. At most once a day.

POST/api/requests/:id/signoff

Save a signature taken on your own device, with the tenant present. strokes is a list of pen strokes, each a list of [x, y] whole numbers on a 600 by 200 pad.

{ "name": "Sam Rivera", "strokes": [[[40, 80], [90, 30], [140, 110], [200, 40]]] }

Units

GET/api/units

Every unit with its tenant and how many requests are still open.

{
  "units": [{
    "id": "a41e…",
    "label": "Apt 4B",
    "tenant_name": "Sam",
    "tenant_email": "sam@example.com",
    "open_requests": 2
  }]
}

PATCH/api/units/:id

Rename a unit or set its tenant. Send all three fields; leave the tenant fields empty to remove the tenant. A new tenant email gets an invitation.

{ "label": "Apt 4B", "tenant_name": "Sam", "tenant_email": "sam@example.com" }

POST/api/units/import

Fill in up to 500 units at once. A row whose label matches an existing unit updates it; any other row takes the next unused unit. New tenant emails are invited. Rows that don’t fit are returned in skipped with a reason.

{ "rows": [
  { "label": "Apt 1A", "tenant_name": "Riley Chen", "tenant_email": "riley@example.com" },
  { "label": "Apt 1B" }
] }

Locations

GET/api/locations

The buildings or sites you manage. Units sit inside them.

{
  "locations": [{ "id": "5d20…", "name": "Maple Court", "address": "12 Maple St", "tenant_booking": 1, "has_cover": 0, "units": 24 }]
}

POST/api/locations

PATCH/api/locations/:id

Add or change a location. tenant_booking decides who sets visit times there: true lets tenants pick their own time, false means your team sets every appointment.

{ "name": "Maple Court", "address": "12 Maple St", "tenant_booking": false }

DELETE/api/locations/:id

Removes the location. Its units stay on your account, without a location. To move a unit, send location_id with PATCH /api/units/:id.

Scheduling

GET/api/schedule?from=…&to=…

Who is booked when, for up to a month at a time (Unix seconds). It returns your working day, the length of a visit, every booked visit in the range and the technicians who could take one. Book a visit by sending scheduled_at with PATCH /api/requests/:id.

{
  "visit_seconds": 3600, "day_start": 8, "day_end": 17,
  "bookings": [{ "id": "8f1c…", "assignee_id": "c7b9…", "scheduled_at": 1795400000, "label": "Apt 4B" }],
  "people": [{ "id": "c7b9…", "name": "Tess Wu", "skills": ["plumbing"], "locations": [] }]
}

Team and vendors

GET/api/technicians

Your technicians, leads and co-managers, with their trades, the locations they cover (an empty list means all of them) and how many tasks each has open.

{
  "technicians": [{ "id": "c7b9…", "name": "Tess Wu", "email": "tess@example.com", "role": "technician",
                    "skills": ["plumbing"], "locations": [], "active": 1, "open_tasks": 2 }]
}

Each person also carries off: their current and coming time off, as id, from_at and to_at.

POST/api/technicians/:id/time-off

Ratings, rules, times and texts. A tenant rates finished work with POST /api/my/requests/:id/rating (stars 1–5, comment); the team reads it at GET /api/requests/:id/rating, Reports carry rating and ratings, and the request.rated webhook fires. A vendor takes auto: spare (sent new tasks in their trade when nobody on the team does it) or always. A vendor may offer up to three visit times when accepting; the tenant picks at /api/my/requests/:id/vendor-times. PUT /api/units/:id/texts with on turns text messages to that unit’s tenant on or off.

Vendors. Handing a task to an outside company (POST /api/requests/:id/forward) emails them a link to accept it with a visit time, decline it, or report it done with a cost. GET /api/requests/:id/vendor-job returns where that stands, and each answer fires the request.vendor_update webhook. Reports now carry first_reply_hours, came_back (repairs repeated within 30 days) and cost_per_unit_cents in totals. Import: POST /api/units/import takes add_units: true to create units for rows that have nowhere to go; the subscription grows by that many.

Owner approvals. A unit can carry an owner (PUT /api/units/:id/owner with name and email). With owner_approval set in PUT /api/invoice-settings, an estimate at or over that amount waits for the owner: POST /api/requests/:id/owner-approval/ask emails them a link, and the task’s go-ahead state carries owner (needed, and status: not_asked, asked, approved or declined). Their answer fires the request.owner_decision webhook. Adding a unit is POST /api/units and removing one DELETE /api/units/:id; the subscription follows the count.

No signature. PUT /api/requests/:id/go-ahead with { "no_signature": true } marks a task as needing no signature from the tenant: work is not held for one, and the invoice is made from the estimate as it stands. A manager or lead only. The state returns it as no_signature.

Inspections. POST /api/units/:id/inspections with { "kind": "move_in" | "move_out" | "routine" } starts one with the usual list of items (an unfinished one is carried on); GET /api/units/:id/inspections lists them and GET /api/inspections/:id returns one in full, where a move-out carries what the last move-in found as before. Rate an item with PATCH /api/inspections/:id/items/:itemId (condition: good, attention or damaged; note), add photos at …/items/:itemId/photos, open a task from one at …/items/:itemId/task, take a signature at …/sign and close it at …/finish, after which it can’t change. Managers and leads only. Finishing emails the tenant a copy; they, and your team, read it at GET /api/inspection-report/:id. Opening a task from an item copies its photos to the task. PUT /api/inspection-items with { "items": ["Entry", "Kitchen", …] } sets the list every new inspection starts with (an empty list restores the usual one).

QR codes. GET /api/qr-codes?unit=ID or ?location=ID returns a code for one unit, or for every unit and shared area of a location: each has the url it opens and an svg picture. A code is made the first time it is asked for and stays the same, so printed ones keep working; POST /api/units/:id/qr/replace makes a new one and retires the old. A request sent from a code has via: "qr" and, when the person gave one, a reporter.

GET /api/conversations lists the 40 most recent conversations with tenants, newest first: the task, the last message and who wrote it, and waiting when the tenant spoke last on an unfinished task.

More than one person can be on a task. assignee_id is who is responsible; send crew, a list of up to five more team member ids, on PATCH /api/requests/:id to set who goes with them (an empty list clears it). Everyone on a visit counts as booked for it, and each task in GET /api/requests lists them as crew.

A team member can carry a daily limit: send max_per_day (1 to 50, or empty for no limit) when you add or change them. Once they have that many visits booked on a day they are not offered for another that day, and booking one by hand answers 409.

Mark someone as not available between two moments (Unix seconds): whole days or a few hours. Nothing is booked with them then. Visits they already had are given to someone else certified and free at the same time, or moved to the next free hour in the following two weeks, or put back to open; the tenant is emailed each time. If they are away for more than a day, their unstarted tasks go to someone else who can take them.

{ "from_at": 1795300000, "to_at": 1795472800, "tz": "America/New_York" }

The answer says what happened:

{
  "id": "5d0a…",
  "covered": [{ "id": "8f1c…", "unit_label": "Apt 4B", "was": 1795330800, "now": 1795330800, "with": "Tess Wu", "how": "person" }],
  "reassigned": [{ "id": "a02b…", "unit_label": "Apt 1C", "with": "Tess Wu" }]
}

how is person (same time, someone else), moved (new time), unbooked (no free time found; back to open) or nobody (time kept, but nobody else is certified).

DELETE/api/technicians/:id/time-off/:offId

Removes a time off. Visits that were already moved stay where they are.

Making someone inactive with PATCH /api/technicians/:id re-covers their booked visits the same way and returns the same covered list.

GET/api/vendors

The outside companies you send tasks to.

GET/api/vendors/:id/tasks

The tasks sent to a vendor and any they were paid on, unfinished first, with paid_cents on each.

Reports

GET/api/reports?days=30

The numbers behind the Reports page for the last 30, 90 or 365 days: totals, open tasks by status, by trade, by person, by unit and by vendor, and how planned maintenance is going.

The report also carries totals.clocked_seconds (time on the clock in the period) and, for keys that may see invoices, invoices: billed_cents, collected_cents (payments less refunds), outstanding_cents, the four age bands (not_due_cents, late_30_cents, late_60_cents, late_more_cents), avg_days_to_pay and by_location.

GET/api/reports/invoices.csv

Every invoice as a spreadsheet: status, location, unit, dates, subtotal, fee, tax, total, paid, still owed and days late.

GET/api/reports/tasks.csv?days=30

Every task touched in the period as a spreadsheet file.

Notes

GET/api/notes?unit_id=… or ?request_id=…

Your private notes on one unit or one request.

POST/api/notes

Add a note to a unit or to a request (one of the two).

{ "request_id": "8f1c…", "body": "Plumber booked Tuesday 9am." }

DELETE/api/notes/:id

Remove a note.

Webhooks

Add up to three addresses under API in the app and Stoopfix will POST to them as things happen, so you don’t have to poll.

EventWhen
request.createdA tenant sends a new request.
request.status_changedA request moves to another status.
request.scheduledA visit is booked, moved or cancelled, by your team or by the tenant. scheduled_at is null when it was cancelled, and by is team or tenant.
message.createdYou or the tenant send a message.
request.go_aheadThe tenant signs to let the work start. Carries estimate_cents and via.
request.ready_to_invoiceSomeone marked a task ready to be invoiced.
request.signed_offThe tenant signs to approve finished work. via is tenant or on_site.
invoice.sentAn invoice is sent to the tenant, with its number, total_cents and due_at.
invoice.paymentA part payment is recorded. amount_cents is this payment; paid_cents is the running total.
invoice.paidAn invoice is paid in full, by hand or by card.
invoice.refundedA refund is recorded. reopened is true when the tenant owes it again.
invoice.voidedA sent invoice is cancelled.
technician.time_offSomeone is marked off, with from_at, to_at, and how many visits were re-covered and tasks handed on.
{
  "type": "request.status_changed",
  "created_at": 1795300000,
  "data": { "id": "8f1c…", "unit_id": "a41e…", "unit_label": "Apt 4B",
            "category": "appliance", "description": "Dishwasher won’t drain", "status": "done" }
}

Check the signature. Every delivery has a Stoopfix-Signature header like t=1795300000,v1=5f2b…. Compute an HMAC-SHA256 of t + "." + raw body using your signing secret, as hex, and compare it to v1. Reject anything that doesn’t match or whose t is more than five minutes old.

Errors

Errors come back as { "error": "A sentence you can show a person." } with one of these codes:

CodeMeaning
400Something in the request is missing or not valid.
401The key is wrong or was deleted.
402The subscription has ended.
403Keys can’t be used for that endpoint.
404No such unit, request or note on your account.
429Too many calls. Wait a minute.