# My Repair Software automation pilot

The API supports location-scoped reads and explicit customer/repair writes. My Repair Software is available as a private, invite-only Zapier app; public Zapier and Make marketplace listings are not yet available. Connector source stays in My Repair Software's private repository. No payment, refund, purchase-order, or customer-message action is included.

## Connect a location

1. An owner or admin selects the intended business and location in My Repair Software, then opens API & integrations → Scoped API access.
2. Create a named token with only the scopes needed below. Use a separate connection for every location. Tokens expire within 90 days; plan replacement before expiry.
3. Store the token in the automation platform's private connection/credential store. Send `Authorization: Bearer <token>` to `https://myrepairsoftware.com/api/public/v1/connection`.
4. Check the returned businessName, locationName, scopes and expiresAt. Never put tokens in URLs, shared blueprints, screenshots, or a browser page.

## Three starter recipes

| Workflow | Trigger/read | Required scopes | Mapping and behavior |
| --- | --- | --- | --- |
| New repair → Google Sheets row | New Repair; `?resource=repairs&order=recent` | repairs:read | Use repair `id` as the unique row key. Map number, device, status, priority and due_at. Search/update the row by ID when supported to avoid duplicate rows on retry. |
| Repair activity → staff review | New Repair Activity; `?resource=events&order=recent&kind=ticket` | events:read; repairs:read for enrichment | Deduplicate by event `id`. Look up `?resource=repairs&id=<record_id>` and include the repair's current status. Activity includes more than status changes; do not filter by parsing action text. |
| Inventory activity → stock review | New Inventory Activity; `?resource=events&order=recent&kind=inventory` | events:read and inventory:read | Look up `?resource=inventory&id=<record_id>`, compare available_quantity with a shop-defined threshold, and create an internal review item. Bulk activities may not identify one item: an empty lookup must be skipped, not treated as zero stock. |

The recipes describe internal workflows. They do not authorize sending customer marketing. Customer service_email/service_sms preferences are not blanket marketing permission.

## Zapier private connector

The private connector contains four polling triggers (New Repair, New Customer, New Repair Activity, New Inventory Activity), three UUID searches (Find Repair, Find Customer, Find Inventory Item), and three write actions (Create Customer, Create Repair, Update Repair Status). Triggers use polling, not instant delivery. Write actions require separately selected write permissions.

Each poll starts at the newest record and reads up to five 50-record pages. Zapier deduplicates using immutable IDs; two separate events concerning the same record retain different IDs. More than 250 matching records between polls, a long outage, or a bulk import can exceed that window. Do not use this pilot for guaranteed delivery or critical fulfillment. Use signed webhooks plus reconciliation for those requirements.

All operations share 60 API requests per token per minute. Each trigger may use five requests; searches and connection checks also count. On HTTP 429 wait at least Retry-After (60 seconds), then retry with jitter. On 401 reconnect using a replacement token; on 403 correct the required scopes.

## Make HTTP recipe

Before a native Make app is approved, the same reads can be configured using Make's HTTP modules:

1. Use a private API-key credential in the Authorization header. Keep the base URL fixed to `https://myrepairsoftware.com`.
2. Schedule a GET to the chosen resource with `order=recent` and, for activities, the relevant `kind`.
3. Parse JSON and iterate the `data` array. Follow `next` by sending it as `after`, preserving resource/order/kind. Do not use an old final cursor as a permanent watermark.
4. Use a Make Data Store keyed by location plus record/event ID. Seed a baseline when enabling the scenario so old history does not become new notifications.
5. Process unseen IDs, then mark successful processing. Use an idempotent destination/upsert when available: a failure between an external action and marking it complete can otherwise duplicate that action.
6. Keep a bounded request budget and handle rate limits explicitly. Reconcile after prolonged outages. An empty data array is normal; an HTTP error is not an empty result.

## Pilot acceptance

Use a dedicated location containing synthetic data before connecting real records to external services. Choose and verify the spreadsheet, internal channel or task destination before enabling it.

- Confirm the connection labels match the location and required scopes.
- Add a synthetic repair: expect one mapped spreadsheet row; poll again: no additional row.
- Record two repair activities for the same ticket: expect two distinct event IDs.
- Change synthetic stock, look up the item and evaluate the configured threshold. Skip archived, unavailable and bulk-only IDs.
- Test pagination, same-timestamp records, an expired/revoked token, a missing scope and 429 retries.
- Confirm no other location's or business's records are returned.
- Record actual hosted runs and destination results before describing the integration as live or submitting it for marketplace review.

## Current API details

The default UUID-ascending list behavior is preserved. Optional `id` returns zero or one scoped record; do not combine it with `after`. `order=recent` is supported for repairs, customers and events, sorted by creation time descending then UUID descending. `kind` applies only to events (job, ticket, invoice, inventory). Inventory remains a current-state read. Write operations are described below. Date filters are not supported. See `/developers/openapi.json` for the full contract.

## Read and write setup for every shop

Owners and admins can open Integrations → Zapier (or My Repair Software API & webhooks), select their own location, and create a token with only the required permissions. Use the [private app invitation](https://zapier.com/developer/public-invite/249754/6d73afb7c2da46829c4ddbbc77baf9c4/) to add My Repair Software to that shop’s Zapier account. Each shop uses its own credentials. This invitation does not imply public marketplace review or approval.

The write-enabled connector adds Create Customer (`customers:write`), Create Repair (`repairs:write`), and Update Repair Status (`repairs:write`). Find Repair requires `repairs:read` and returns `status_revision`; map this value unchanged into Expected Revision for a status update. Creates return the record ID for the next step. Customer creation starts with all communication consent disabled. Status changes respect existing shop workflow, signature and notification rules.

For every write step, map Request Key to a stable unique source event ID with a step-specific prefix. For example, `intake-customer:submission123` and `intake-repair:submission123` are different actions. Reusing a key for different data returns a conflict. Retrying the same key and payload with the same token returns the original receipt. Never generate a new key just to retry a timeout. After replacing a token, reconcile any uncertain writes before retrying them. Record receipts last for the token’s lifetime.

A useful first Zap is a form submission → Create Customer → Create Repair. Use a synthetic customer without a real phone/email for testing. To update existing repairs, use the exact UUID → Find Repair → Update Repair Status, mapping the fresh revision. A 409 means the request key conflicts or the repair changed: review the latest record before choosing a new action.

Custom clients and Make can call `POST /api/public/v1/customers`, `POST /api/public/v1/repairs`, and `PATCH /api/public/v1/repairs/{id}/status` with a Bearer token, JSON body, and stable `Idempotency-Key` header. See the OpenAPI and Postman downloads for all fields. Writes share the 60 requests/minute token limit and accept at most 32 KiB of JSON. API receipts and audit entries identify the token; they do not store submitted customer details.
