Skip to navigation

What's live in dev

The contract (openapi.yaml) lists every endpoint planned. This page lists what is live in dev right now (https://schedule-api-dev.moxieservices.com), what to know when building against it, and the dev test data. Build screens against the live endpoints below; for anything not listed, use the mock (pnpm mock).

Updated by every backend feature pull request (a test fails if an endpoint the API serves isn’t listed here).

Contract: 0.9.10-draft (pnpm contract:pull 0.9.10-draft). 0.9.10 adds the AM/PM windows to the scheduling settings (010).

Booking site (customer)

Catalog and terms — live

OperationEndpointNotes
getCatalogGET /v1/public/catalog?zip=Plans, add-ons, pests for the office serving the ZIP. Optional homeSqft adds each plan’s price for that home; planId shows a link-only plan. 422 zip_not_serviced. Cached up to 30 s. 120/min per visitor.
getCurrentTermsGET /v1/public/terms/currentAgreement text (cleaned HTML), version and effective date. Send version back at Order Complete.

Signup draft (address to agreement) — live

OperationEndpointNotes
createSignupPOST /v1/signupNeeds CF-Turnstile-Response. 201 gives signupId, linkToken, resumeUrl (token in the #t= fragment). 422 zip_not_serviced; 409 existing_customer with details.callCenterPhone. A retry with the same Idempotency-Key returns the same signup with a new token: use the latest one. 10/min per visitor.
getSignupGET /v1/signup/{id}Send X-Link-Token. Wrong token and unknown ID both 404; expired (30 days) 410.
updateSignupPATCH /v1/signup/{id}Any of property, contact (fields merge), pestIds, planId, smsConsent, step. Server works out addOnIds. Unknown fields (including address, addOnIds) → 422. Step never moves backward.
createQuotePOST /v1/signup/{id}/quoteNeeds property, contact and plan (422 names what’s missing); property.homeSqft “call us” when the home is too big. Valid 24 h.
applyDiscountCode / removeDiscountCodePUT / DELETE /v1/signup/{id}/discountEvery refusal is the same 422 discount_not_applicable. 5/min per signup, 20/hour per visitor.

Order Complete and progress — live

OperationEndpointNotes
completeSignupPOST /v1/signup/{id}/completeNeeds Idempotency-Key (new one per attempt; reuse it only for retries of the same click) and CF-Turnstile-Response. 202 then poll status. 409 price_changed / quote_expired / item_unavailable with details.quote (show old vs new, confirm, retry with a new key); 409 invalid_state outside draft/failed/declined.
getSignupStatusGET /v1/signup/{id}/statusPoll every second while processing. Ends awaiting_appointment (go to the appointment step), payment_declined (card step; no error), or failed (error with a contract code; show the reference and Try again). 409 invalid_state for a draft.

Appointment and confirmation — live

OperationEndpointNotes
getAvailabilityGET /v1/signup/{id}/availabilityOnly in awaiting_appointment / slot_unavailable (else 409 invalid_state). Dates with the windows that have an open spot, each with label, start, end (office local time). Empty options comes with routesFullMessage: show it instead of a calendar. 503 fieldroutes_unavailable: offer Retry. Cached up to 60 s. 60/min per signup.
scheduleAppointmentPUT /v1/signup/{id}/appointment{"date", "slot": "am" or "pm"}; optional Idempotency-Key. 202 with five steps, then poll status. 422 on date when the date isn’t offered. 409 invalid_state while a booking runs or after complete. 5/min per signup.
getSignupStatus (phase 2)GET /v1/signup/{id}/statusEnds complete (show the confirmation page from confirmation, accountNumber, confirmationSentTo), slot_unavailable (back to the calendar; no error), or awaiting_appointment with error (booking failed: show it on the calendar, let them try again). complete arrives before the email is out: the last step may still be running.
resendConfirmationPOST /v1/signup/{id}/resend-confirmationcomplete only (else 409). 202 with no body; 3 an hour per signup, then 429.

Admin portal

Sign-in and access — live

OperationEndpointNotes
createAdminSessionPOST /v1/admin/session{"googleIdToken": ...}, or in dev only {"testEmail": ...}. Returns token (8 h) and me. Send Authorization: Bearer <token>.
getMeGET /v1/admin/meUser, permissions, offices.
listOffices, getOffice, listOfficeGroupsGET /v1/admin/offices, /offices/{id}, /office-groupsOnly the caller’s offices; others are 404.
listUsers, createUser, updateUser, patchUser/v1/admin/usersPaged; version on saves (409 version_conflict); create takes Idempotency-Key. Nobody can widen their own access.
listRoles, createRole, updateRole, listPermissions/v1/admin/roles, /v1/admin/permissions

Catalog and follow-up — live

OperationEndpointNotes
previewPlanPricingPOST /v1/admin/pricing/previewNeeds sub_manage:view.
listSignups, getSignupAdminGET /v1/admin/signups, /signups/{id}Needs dashboard:view. Filters state, from, to, officeId; cursor paging. Detail has progress, FieldRoutes customer, flags, failure reason, agreement (signature as a data URL).

Catalog editing — live

OperationEndpointNotes
listSubscriptionTypes, getSubscriptionType, createSubscriptionType, updateSubscriptionType, setSubscriptionTypeAvailability, setSubscriptionTypeOffice, resetSubscriptionTypeOffice/v1/admin/subscription-typesNeeds sub_manage (view/edit), sub_create:yes to create. Lists: limit (default 50, max 200) and cursor, newest first; officeId shows only that office. offices lists every office you may see; no setting = {"inherited": true, "active": false}. Save sends the whole plan plus version (409 version_conflict if someone saved first); offices not listed are left alone. On with no fieldRoutesServiceTypeId = “not offered yet”. Create with officeId = active only there; office-limited users must. Optional Idempotency-Key on create.
listAddOns, getAddOn, createAddOn, updateAddOn, setAddOnAvailability, setAddOnOffice, resetAddOnOffice/v1/admin/add-onsAs plans, with addon_*. At least one compatible plan; per-plan prices only for compatible plans. Office priceOverride: blank inherits, 0 is free.
listPests, getPest, createPest, updatePest, setPestAvailability, setPestOffice, resetPestOffice/v1/admin/pestsAs plans, with pest_*. Office settings only through set/reset office; requiredAddOnId: "none" means no add-on there (different from inheriting). Icon: {"kind":"builtin","name":...} or {"kind":"upload","assetId":...}.
listPestGroups, createPestGroup, updatePestGroup/v1/admin/pest-groupspest_manage; all-offices users only for saves.
uploadIcon, deleteIcon/v1/admin/uploads/iconsMultipart file, PNG or SVG up to 200 KB (SVGs cleaned). Delete: 409 invalid_state with details.pestIds while in use.
getIconGET /v1/public/icons/{assetId}Public; the url you get from upload.

Field errors name JSON paths, e.g. pricing.sqftScaling.initial.stepSqft, offices[office-dallas].fieldRoutesServiceTypeId.

Discount codes and referral settings — live

OperationEndpointNotes
listDiscountCodes, getDiscountCode, createDiscountCode, updateDiscountCode, setDiscountCodeStatus/v1/admin/discount-codesdisc_manage (view/edit), disc_create:yes to create. Filters status, activeOn, search, officeId; paged newest first. Blank code = generated; 409 duplicate (any letter case). After the first use only expiresOn, officeIds, planIds, status change (422 locked_after_redemption with fieldErrors); lockedFields and redemptionCount tell you. Saves need version; the status switch doesn’t but makes older editors stale. shareUrl is {booking site}/?code=CODE: the booking site should read ?code= and fill the code in. Office users see codes with any of their offices, change only codes whose offices are all theirs.
getCustomerReferralsSettings, updateCustomerReferralsSettings, overrideCustomerReferralsSettings, resetCustomerReferralsSettings, getEmployeeReferralsSettings, updateEmployeeReferralsSettings, overrideEmployeeReferralsSettings, resetEmployeeReferralsSettings/v1/admin/settings/customer-referrals, /employee-referralsref_cust / ref_emp. Read: global, globalVersion (0 = never saved), overrides; with officeId also effective and effectiveSource. Global save needs every office and version; an office override needs that office (no version when creating it). Stored only in v1: no effect on prices. “Apply to all types” is done in the portal before saving.

Order Complete: when someone else took a code’s last use, 409 price_changed with details.quote without the discount.

Settings with office overrides and the office overview — live

OperationEndpointNotes
getSchedulingSettings, updateSchedulingSettings, overrideSchedulingSettings, resetSchedulingSettings/v1/admin/settings/schedulingsched_rules. Drives availability now: lead days, change time, blackout days, the routes-full message and the AM/PM windows (labels and times) per office. 422 with fieldErrors when latestDays is before earliestDays, a window ends before it starts, or changeTime isn’t 1:00 to 12:59.
getRouteGroupsSettings, updateRouteGroupsSettings, overrideRouteGroupsSettings, resetRouteGroupsSettings/v1/admin/settings/route-groupssched_routes. FieldRoutes route group IDs (whole numbers from 1). Saved and passed to scheduling; dev’s stand-in ignores them.
getAbandonedCartSettings, updateAbandonedCartSettings, overrideAbandonedCartSettings, resetAbandonedCartSettings/v1/admin/settings/abandoned-cartdisc_manage. Stored only: nothing is sent yet (012).
getCustomerNotificationsSettings, updateCustomerNotificationsSettings, overrideCustomerNotificationsSettings, resetCustomerNotificationsSettings/v1/admin/settings/customer-notificationscn_settings; changing any subject or body also needs cn_content:edit (403 otherwise; timing and channel changes don’t). At most 5 cart reminders. Stored only: nothing is sent yet.
getIntegrationsSettings, updateIntegrationsSettings, overrideIntegrationsSettings, resetIntegrationsSettings/v1/admin/settings/integrationsintegrations. Tracking IDs, stored as sent.
getOfficeOverview/v1/admin/offices/{officeId}/overviewSigned in. office always; plans only with sub_manage:view, addOns only with addon_manage:view (each with the office’s active, inherited, FieldRoutes ID and price), programs with each program’s view permission. Office outside your access: 404.
updateOfficeContact/v1/admin/offices/{officeId}/contactcontact_info:edit and the office. Send the whole contact with version (from office.contact.version); 409 when stale. visible says which fields customers see (all, until edited).

All sections share the referral settings’ pattern above: global, globalVersion, overrides, and with officeId the effective value and its source; office users change only their offices’ overrides.

OperationEndpointNotes
getServiceArea, saveServiceArea/v1/admin/offices/{officeId}/service-areaareas. Save sends the office’s full zips with version; a ZIP another office owns must be in transfers (move here) or left out (stays with its owner), else 409 unresolved_overlaps with details.overlaps (zip, officeId, officeName). The response’s released lists ZIPs taken from other offices. Moving needs the other office too. The booking site follows on the next request.
listZipOwners/v1/admin/service-area/zip-owners?zips=75001,73301&excludeOfficeId=areas:view. Up to 1,000 ZIPs; use it to show overlaps before saving.
pullServiceArea/v1/admin/offices/{officeId}/service-area/pullareas:edit. 202 with a Job; poll getJob. Adds the ZIPs of the office’s active FieldRoutes customers that nobody owns; result: found, added, ownedElsewhere. 422 when the office has no FieldRoutes office ID.
listFieldRoutesItems/v1/admin/fieldroutes/{kind} (service-types, add-ons, sources, employees, route-groups)The copied lists, never FieldRoutes live. Readable with frids:view or the view permission of a page with a FieldRoutes dropdown (plans, add-ons, discount codes, route groups, links). Dropdowns pass available=true (hidden items and the sub-sources of hidden sources are left out). Filter officeId; paged. An ID you saved that isn’t in the list: show it as “unknown”.
setFieldRoutesItemAvailability, setFieldRoutesSubSourceAvailabilityPATCH /v1/admin/fieldroutes/{kind}/{officeId}/{itemId}, .../sources/{officeId}/{sourceId}/sub-sources/{subSourceId}frids:edit. {"available": false} hides it from dropdowns only.
syncFieldRoutes, getJobPOST /v1/admin/fieldroutes/sync, GET /v1/admin/jobs/{jobId}frids:edit (route groups alone: sched_routes:edit is enough). 202 with a Job (queued, running, succeeded, failed); result.counts per list, failed offices (they keep yesterday’s list), skipped offices (no FieldRoutes ID), notAvailable lists. Asking again while a job covering the office runs returns that job. Lists also refresh every night.
listUrlLinks, createUrlLink, updateUrlLink, deleteUrlLink/v1/admin/url-linksurls. The server returns url (booking site with the utm values and urlLinkId); the booking site should pass urlLinkId and the utm values in attribution when a signup starts. Same source, campaign and medium (any case) → 409 duplicate with details.existingLinkId. version on update. Office users see links mapped to their offices and change only their offices’ mappings.
listSetupAlerts/v1/admin/dashboard/alertsdashboard:view. missing_fieldroutes_ids (warning) and no_service_area (critical) for your offices, with fixPath. Offices now also carry zipCount, missingIdCount and setupGaps.

FieldRoutes source at Order Complete: a discount code’s campaign source, else the link’s mapping for the office, else the office’s default online source.

Operations — live

OperationEndpointNotes
getPaymentGateway, savePaymentGateway, testPaymentGateway/v1/admin/offices/{officeId}/payment-gatewaygateways. The key is write-only (12+ characters): answers show apiKeyConfigured and apiKeyLast4 only. Never saved: status not_configured (no merchantId yet). Leave apiKey out to keep the stored key. A new key or merchant ID → untested. Test: 422 until saved; GatewayTestResult ready/failed with message. Dev runs the payments stand-in, so tests answer ready.
getDashboardSummary, listAbandonedCarts/v1/admin/dashboard/summary?from=&to=&officeId=, /v1/admin/dashboard/abandoned-cartsdashboard:view. Counts signups started in the range (office local dates, at most 366 days). visits is 0 until GA4 is connected. Bookings = paid. Abandoned = contact details, idle over an hour before Order Complete, not bought since. discountCodeSent is always false (customer reminder emails aren’t built).
listOfficeNotificationRules, createOfficeNotificationRule, updateOfficeNotificationRule, deleteOfficeNotificationRule/v1/admin/office-notification-ruleson_settings. 1 to 20 recipients; delay up to 24 hours (returned in minutes). Only new_sale and abandoned_cart send emails; the other four types are stored. Office users: rules touching their offices, editable only when all its offices are theirs; all-offices rules need every office.
listWebhooks, updateWebhook, setWebhookOffice, resetWebhookOffice/v1/admin/webhookswebhooks. Delays: abandoned cart 5 to 60, lead created 0 to 60, new sale 0. Global saves need every office; office switches need that office. Dev has no destination yet, so nothing is sent (the data team sets it).
listTeams, createTeam, updateTeam, deleteTeam/v1/admin/teamsteams. Unique names (any case, 409 duplicate); up to 200 FieldRoutes employee IDs.

Not live yet

Nothing in the contract: every operation is served. GA4 visits, customer reminder emails and texts, and real Payrix charging come later.

Dev test data

WhatValue
Served ZIPsDallas 75001, 75002, 75201; Austin 73301, 78701
Existing-customer addressstreet line 1 Existing Customer Way (any served ZIP) → 409 existing_customer
Turnstilesite key 1x00000000000000000000AA (always passes); dummy token XXXX.DUMMY.TOKEN.XXXX
Discount codesWELCOME10 (10% off initial), SAVE25 ($25 off, Quarterly only); refused: EXPIRED20, ONETIME, AUSTIN15 (in Dallas), PAUSED
Payment tokens (stand-in, no money moves)tok_pass (or anything else) succeeds; tok_decline, tok_expired decline; tok_timeout charges but loses the answer
Discount codesPortal-edited codes stay across deploys (the sample file loads only into an empty table).
Catalog editingThe dev catalog is no longer reset on deploys: what you change in the portal stays. Put prices back after testing.
Admin test sign-in{"testEmail": "test.admin@moxiepestcontrol.com"} (everything), test.manager@... (North Texas, view-mostly), or your own company email
FieldRoutesCustomers and plans are created in the FieldRoutes sandbox (office 10 for Dallas, 712 for Austin)
FieldRoutes listsEmpty until the first refresh (nightly, or the refresh button). The sandbox has service types, add-on products, sources and employees for Dallas (office 10); route groups show as not available (no sandbox routes yet).
Scheduling settingsDallas and Austin have office overrides from the dev file (Dallas 1 to 14 days, no Sundays; Austin 2 to 14, no weekends). Portal edits stay; the file only seeds offices with none.
AppointmentsA stand-in until the sandbox has bookable routes: every allowed date has both windows open (Dallas: 1 to 14 days out, no Sundays; Austin: 2 to 14, no weekends). Bookings aren’t in FieldRoutes yet.
Confirmation emailNot sent in dev until SendGrid is set up; then only to @moxiepestcontrol.com addresses and one test inbox. Other addresses show as sent but are only recorded.