Manage recurring invoice schedules in RepairShopr
I manage recurring invoice schedules. Schedules automatically generate invoices on a regular basis (daily, weekly, monthly, etc.). They are useful for service contracts or subscription billing where the same invoice is sent repeatedly. I can create, view, update, delete schedules and manage their line items.
Use this when:
Required API base URL:
VITE_REPAIRSHOPR_SUBDOMAINVITE_REPAIRSHOPR_API_KEYPermissions:
List Schedules (GET /schedules) Optional:
customer_id (integer) - Filter by customerpage (integer) - Page number (25 results per page)Create Schedule (POST /schedules) Required fields not fully explicit in docs; typical required:
customer_id (integer) - Customerfrequency (string) - Recurrence: "Daily", "Weekly", "Monthly", "Quarterly", "Yearly", etc.name (string) - Schedule namenext_run (string) - Next invoice date (ISO 8601)Optional:
email_customer (boolean) - Email invoice automaticallysnail_mail (boolean) - Mail paper copycharge_mop (boolean) - Charge payment method on filesubtotal (number) - Subtotal amountlines (array) - Line items (though usually added via separate endpoint)invoice_unbilled_ticket_charges (boolean) - Include unbilled ticket workpaused (boolean) - Pause the scheduleGet Schedule (GET /schedules/{id})
id (integer) - Schedule IDUpdate Schedule (PUT /schedules/{id})
id (integer) - Schedule ID
Body fields similar to create, all optionalDelete Schedule (DELETE /schedules/{id})
id (integer) - Schedule IDAdd Line Item (POST /schedules/{id}/add_line_item)
id (integer) - Schedule ID
Body (line item fields):name (string) - Item name (required)description (string)cost_cents / retail_cents or price_cost/price_retail (numbers)quantity (string/number)product_id (integer, optional)taxable (boolean)user_id (integer)Remove Line Item (POST /schedules/{id}/remove_line_item)
id (integer) - Schedule ID
Body may include schedule_line_item_id or just the line item ID in bodyUpdate Line Item (PUT /schedules/{id}/line_items/{schedule_line_item_id})
id (integer) - Schedule IDschedule_line_item_id (integer) - Line item ID
Body fields: name, description, cost_cents, retail_cents, quantity, taxable, etc.Example call:
// Create monthly maintenance schedule
const schedule = await skill({ name: "repairshopr-schedule" }, {
customer_id: 123,
name: "Monthly IT Support",
frequency: "Monthly",
next_run: "2024-02-01",
email_customer: true,
subtotal: 299.99
})
// Add recurring line item
await skill({ name: "repairshopr-schedule" }, {
name: "Managed Services - 5 devices",
description: "Monthly network monitoring and support",
retail_cents: 29999,
quantity: 1,
taxable: false
}, { id: schedule.schedule.id, method: 'POST', endpoint: '/add_line_item' })
// Pause schedule
await skill({ name: "repairshopr-schedule" }, { paused: true },
{ id: schedule.schedule.id, method: 'PUT', pathParams: { id: schedule.schedule.id } }
)
Response includes:
id, customer_id, frequency, next_run, subtotal, lines (line items array), paused, etc.schedule_line_itemnext_run determines when the next invoice will be auto-generatedpaused stops automatic generation without deleting schedulerepairshopr-invoice - The generated invoices from schedulesrepairshopr-contract - Contracts may be associated but separaterepairshopr-ticket - Some schedules include unbilled ticket charges