| name | repairshopr-contract |
| description | Manage service contracts in RepairShopr - create, retrieve, update, delete |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"administrators, account managers","api":"GET /contracts, POST /contracts, GET /contracts/{id}, PUT /contracts/{id}, DELETE /contracts/{id}"} |
What I do
I manage service contracts between your business and customers. Contracts define service agreements, SLA terms, and can be linked to tickets and assets. I support full CRUD operations.
When to use me
Use this when:
- Selling or establishing service-level agreements
- Tracking contract start/end dates and amounts
- Associating contracts with customers for automatic ticket SLA application
- Managing contract status (Opportunity, Active, Expired, etc.)
How to use
Required API base URL:
VITE_REPAIRSHOPR_SUBDOMAIN
VITE_REPAIRSHOPR_API_KEY
Permissions:
- "Contracts - List/Search" for listing
- "Contracts - Edit" for create/update, and for viewing single contract
- "Contracts - Delete" for deletion
List Contracts (GET /contracts)
Optional:
page (integer) - Page number (50 results per page)
Create Contract (POST /contracts)
Required:
customer_id (integer) - Customer this contract belongs to
Optional:
name (string) - Contract name/title
contract_amount (string) - Contract value (e.g., "30k")
start_date (string) - Start date (ISO 8601)
end_date (string) - End date (ISO 8601)
description (string) - Contract description
primary_contact (string) - Primary contact person
status (string) - Status (e.g., "Opportunity", "Active", "Expired")
likelihood (integer) - Likelihood percentage (0-100)
apply_to_all (boolean) - Apply to all customer assets
sla_id (integer) - Associated SLA ID
Get Single Contract (GET /contracts/{id})
id (integer, required) - Contract ID
Update Contract (PUT /contracts/{id})
id (integer, required) - Contract ID
Optional body similar to create (all fields updatable)
Delete Contract (DELETE /contracts/{id})
id (integer, required) - Contract ID
Example call:
const result = await skill({ name: "repairshopr-contract" }, {
customer_id: 123,
name: "Annual Maintenance Agreement",
contract_amount: "$3,600",
start_date: "2024-01-01T00:00:00Z",
end_date: "2024-12-31T23:59:59Z",
status: "Active",
description: "Covers unlimited repairs for up to 10 devices"
})
Response includes:
- Contract object with fields:
id, customer_id, name, contract_amount, start_date, end_date, status, sla_id, etc.
Important
customer_id is required and must exist
- Date fields should be in ISO 8601 format
status values are flexible but typically include: Opportunity, Active, Expired, Canceled
apply_to_all links contract to all customer assets on creation
Related skills
repairshopr-customer-search - To get customer ID
repairshopr-sla (if available) - For SLA configurations
repairshopr-asset - For asset-contract relationships