API to update scheduled recurring invoice

http
POST https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/updateAndSchedule

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
scheduleIdstringYes6578278e879ad2646715ba9cSchedule Id

Responses

200 - Successful response
  • _id (string, required): Schedule Id Example: 6578278e879ad2646715ba9c

  • status (object, required): Schedule Status Example: draft

  • liveMode (boolean, required): Live Mode Example: False

  • altId (string, required): Account Id or Agency Id Example: 6578278e879ad2646715ba9c

  • altType (string, required): Possible values: 'account'

  • name (string, required): Name of the invoice Example: New Invoice

  • schedule (object)

    • executeAt (string)

    • rrule (object)

      • intervalType (string, required): Possible values: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly' Example: monthly

      • interval (number, required): Example: 2

      • startDate (string, required): Start date in YYYY-MM-DD format Example: 2023-01-01

      • startTime (string): Start time in HH:mm:ss format Example: 20:45:00

      • endDate (string): End date in YYYY-MM-DD format Example: 2029-11-01

      • endTime (string): End time in HH:mm:ss format Example: 18:45:00

      • dayOfMonth (number): -1, 1, 2, 3, ..., 27, 28 Example: 15

      • dayOfWeek (string): Possible values: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su' Example: mo

      • numOfWeek (number): -1, 1, 2, 3, 4 Example: -1

      • monthOfYear (string): Possible values: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' Example: jan

      • count (number): Max number of task executions Example: 10

      • daysBefore (number): Execute task number of days before Example: 5

      • useStartAsPrimaryUserAccepted (boolean): Start as primary user accepted date Example: True

      • endType (string): End type like after, by, count Example: by

  • invoices (object[], required): List of invoices

    • _id (string, required): Invoice Id Example: 6578278e879ad2646715ba9c

    • status (string, required): Invoice Status Possible values: 'draft', 'sent', 'payment_processing', 'paid', 'void', 'partially_paid' Example: draft

    • liveMode (boolean, required): Live Mode Example: False

    • amountPaid (number, required): Amount Paid Example: 0

    • altId (string, required): Account Id or Agency Id Example: 6578278e879ad2646715ba9c

    • altType (string, required): Possible values: 'account'

    • name (string, required): Name of the invoice Example: New Invoice

    • businessDetails (object, required): Business Details

    • invoiceNumber (number, required): Invoice Number Example: 19

    • currency (string, required): Currency Example: USD

    • contactDetails (object, required): Contact Details

    • issueDate (string, required): Issue date in YYYY-MM-DD format Example: 2023-01-01

    • dueDate (string, required): Due date in YYYY-MM-DD format Example: 2023-01-01

    • discount (object): Discount

    • invoiceItems (string[], required): Invoice Items

    • total (number, required): Total Amount Example: 999

    • title (string, required): Title Example: INVOICE

    • amountDue (number, required): Total Amount Due Example: 999

    • createdAt (string, required): created at Example: 2023-12-12T09:27:42.355Z

    • updatedAt (string, required): updated at Example: 2023-12-12T09:27:42.355Z

    • automaticTaxesEnabled (boolean): Automatic taxes enabled for the Invoice Example: True

    • automaticTaxesCalculated (boolean): Is Automatic taxes calculated for the Invoice items Example: True

    • paymentSchedule (object): split invoice into payment schedule summing up to full invoice amount

  • businessDetails (object, required): Business Details

  • currency (string, required): Currency Example: USD

  • contactDetails (object, required): Contact Details

  • discount (object): Discount

  • items (string[], required): Invoice Items

  • total (number, required): Total Amount Example: 999

  • title (string, required): Title Example: INVOICE

  • termsNotes (string, required): Terms notes Example: Confidential

  • compiledTermsNotes (string, required): Compiled terms notes Example: Confidential

  • createdAt (string, required): created at Example: 2023-12-12T09:27:42.355Z

  • updatedAt (string, required): updated at Example: 2023-12-12T09:27:42.355Z

json
{
  "_id": "6578278e879ad2646715ba9c",
  "status": "draft",
  "liveMode": false,
  "altId": "6578278e879ad2646715ba9c",
  "altType": "account",
  "name": "New Invoice",
  "schedule": {
    "executeAt": "string",
    "rrule": {
      "intervalType": "monthly",
      "interval": 2,
      "startDate": "2023-01-01",
      "startTime": "20:45:00",
      "endDate": "2029-11-01",
      "endTime": "18:45:00",
      "dayOfMonth": 15,
      "dayOfWeek": "mo",
      "numOfWeek": -1,
      "monthOfYear": "jan",
      "count": 10,
      "daysBefore": 5,
      "useStartAsPrimaryUserAccepted": true,
      "endType": "by"
    }
  },
  "invoices": [
    {
      "_id": "6578278e879ad2646715ba9c",
      "status": "draft",
      "liveMode": false,
      "amountPaid": 0,
      "altId": "6578278e879ad2646715ba9c",
      "altType": "account",
      "name": "New Invoice",
      "businessDetails": {
        "name": "Alex",
        "address": {
          "addressLine1": "9931 Beechwood",
  // truncado: 94 lineas mas
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/updateAndSchedule' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'

Last updated October 26, 2026

Was this page helpful?