Create a recurring invoice schedule
Creates a schedule that automatically generates invoices at the specified frequency. The first invoice is generated on startDate (or immediately if omitted).
Authorization
apiKey API key issued from your AgentInvoice account settings.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://app.agentinvoice.co/api/recurring-schedules" \ -H "Content-Type: application/json" \ -d '{ "clientId": 42, "frequency": "monthly", "lineItems": [ { "description": "Monthly retainer", "unitPrice": "2000.00" } ] }'{
"id": 10,
"clientId": 42,
"frequency": "monthly",
"customIntervalDays": 0,
"currency": "USD",
"notes": "string",
"terms": "string",
"lineItems": [
{
"id": 1,
"description": "Monthly retainer",
"quantity": "1.00",
"unitPrice": "2000.00",
"taxRate": "0.10",
"amount": "2000.00",
"sortOrder": 0
}
],
"autoSend": true,
"isActive": true,
"maxInvoices": 0,
"nextRunAt": "2019-08-24T14:15:22Z",
"lastRunAt": "2019-08-24T14:15:22Z",
"totalGenerated": 6,
"clientName": "string",
"clientEmail": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": "Not found",
"code": "NOT_FOUND"
}