ServiceKing

API

Make a token on your tokens page, and send it as Authorization: Bearer hs_.... It can do what you can, no more. Every path starts https://getserviceking.com/api. Money is whole cents. Times are milliseconds since 1970, in UTC.

Customers

GET /customersSearch with q; filter with filter=members|owing|commercial; page with limit and page.
POST /customersA customer and their first address. A likely duplicate comes back as duplicates unless you send force.
GET /customer/{id}Everything about them: addresses, contacts, jobs, invoices, estimates, memberships, equipment.
PUT /customer/{id}Change details.
POST /customer/{id}/mergeMove everything into another customer: {"into": id}.
GET /by-phoneWho a phone number belongs to.

Jobs

POST /jobsBook a job: customer, location, job_type, start_at, techs, arrive_from, arrive_to.
GET /jobsFilter by status, tech, customer, from, to, q.
GET /job/{id}The whole job, with visits, invoice, estimates, forms, costs and history.
POST /job/{id}/do/{action}complete, hold, unhold, cancel, uncancel, reopen.
POST /appt/{id}/do/{action}dispatch, arrive, done, confirm, hold, reopen.
POST /appt/{id}/assignWho's going: {"techs": [ids]}. Warns about clashes.
GET /availabilityOpen arrival windows for a job_type at a location or zip.
GET /boardThe dispatch board for a day.
POST /assistWho should go where. Shows you unless you send apply.
POST /optimizeA shorter route for a tech on a day.

Money

GET /pricebookFilter by kind and q.
POST /estimatesjob or customer, name, tier, proposal, items.
POST /estimate/{id}/sellSold: how is now or later.
GET /invoicesfilter=review|unpaid|overdue|unsent.
GET /invoice/{id}Lines, payments and totals.
POST /invoice/{id}/itemsAdd a line: a pricebook item, or your own name and price.
POST /paymentscustomer, kind, amount, and apply or auto.
POST /payment/{id}/refundMoney going back.
GET /agingWho owes what, and for how long.

Memberships and agreements

POST /membershipsSell one: customer, mem_type.
GET /membershipsFilter by status.
POST /agreementsA service agreement.
GET /followupsEverything started and not finished.

The field

GET /field/packA technician's next week, with everything needed to work with no signal.
POST /field/opsWhat happened, each with its own op id and the moment at. Safe to send twice.

Your data

POST /takeoutMake a copy of everything. Admins only.
GET /takeoutHow that's going, and the token when it's ready.
GET /takeout/file/{token}The file: spreadsheets, photos and a note saying what's in it.