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_SUBDOMAINVITE_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/titlecontract_amount(string) - Contract value (e.g., "30k")start_date(string) - Start date (ISO 8601)end_date(string) - End date (ISO 8601)description(string) - Contract descriptionprimary_contact(string) - Primary contact personstatus(string) - Status (e.g., "Opportunity", "Active", "Expired")likelihood(integer) - Likelihood percentage (0-100)apply_to_all(boolean) - Apply to all customer assetssla_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_idis required and must exist- Date fields should be in ISO 8601 format
statusvalues are flexible but typically include: Opportunity, Active, Expired, Canceledapply_to_alllinks contract to all customer assets on creation
Related skills
repairshopr-customer-search- To get customer IDrepairshopr-sla(if available) - For SLA configurationsrepairshopr-asset- For asset-contract relationships