API to update an schedule by schedule id

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

Authorization

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

Path parameters

NameTypeRequiredExampleDescription
scheduleIdstringYes6578278e879ad2646715ba9cSchedule Id

Body

NameTypeRequiredExampleDescription
altIdstringYes6578278e879ad2646715ba9caccount Id / company Id based on altType
altTypestringYesaccountAlt Type Possible values: 'account'
namestringYes
  • contactDetails (object, required)

    • id (string, required): Contact ID Example: 6578278e879ad2646715ba9c

    • name (string, required): Contact Name Example: Alex

    • phoneNo (string, required): Contact Phone Number Example: +1234567890

    • email (string, required): Contact Email Example: alex@example.com

    • additionalEmails (object[]): Secondary email addresses for the contact to be saved

      • email (string, required): Example: alex@example.com

    • companyName (string): Contact Company Name Example: ABC Corp.

    • address (object)

      • addressLine1 (string): Address Line 1 Example: 9931 Beechwood

      • addressLine2 (string): Address Line 2 Example: Beechwood

      • city (string): City Example: St. Houston

      • state (string): State Example: TX

      • countryCode (string): Country Code Example: US

      • postalCode (string): Postal Code Example: 559-6993

    • customFields (string[]): Custom Values

  • schedule (object, required)

    • 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

NameTypeRequiredExampleDescription
liveModebooleanYes
  • businessDetails (object, required)

    • logoUrl (string): Business Logo URL Example: https://example.com/logo.png

    • name (string): Business Name Example: ABC Corp.

    • phoneNo (string): Business Phone Number Example: +1-214-559-6993

    • address (object): Business Address Example: 9931 Beechwood, TX

    • website (string): Business Website Link Example: wwww.example.com

    • customValues (string[]): Custom Values

NameTypeRequiredExampleDescription
currencystringYes
  • items (object[], required)

    • name (string, required): Invoice Item Name Example: ABC Product

    • description (string): Invoice descriptions Example: ABC Corp.

    • productId (string): Product Id Example: 6578278e879ad2646715ba9c

    • priceId (string): Price Id Example: 6578278e879ad2646715ba9c

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

    • amount (number, required): Product amount Example: 999

    • qty (number, required): Product Quantity Example: 1

    • taxes (object[]): Tax

      • _id (string, required)

      • name (string, required)

      • rate (number, required)

      • calculation (string): Possible values: 'exclusive'

      • description (string)

      • taxId (string)

    • automaticTaxCategoryId (string): Tax category id for calculating automatic tax Example: 6578278e879ad2646715ba9c

    • isSetupFeeItem (boolean): Setupfee item, only created when 1st invoice of recurring schedule is generated

    • type (string): Price type of the item Possible values: 'one_time', 'recurring' Example: one_time

    • taxInclusive (boolean): true if item amount is tax inclusive Example: True

  • discount (object, required)

    • value (number): Discount Value Example: 10

    • type (string, required): Discount type Possible values: 'percentage', 'fixed' Example: percentage

    • validOnProductIds (string[]): Product Ids on which discount is applicable Example: [ '6579751d56f60276e5bd4154' ]

NameTypeRequiredExampleDescription
termsNotesstringNo
titlestringNo
  • attachments (object[]): attachments for the invoice

    • id (string, required): Id of the file selected Example: 6241712be68f7a98102ba272

    • name (string, required): Name of the file Example: Electronics.pdf

    • url (string, required): URL of the file Example: https://example.com/digital-delivery

    • type (string, required): Type of the file

    • size (number, required): Size of the file Example: 10000

NameTypeRequiredExampleDescription
miscellaneousChargesobjectNomiscellaneous charges for the invoice

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 PUT 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "account",
  "name": "string",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": [
      "string"
    ]
  },
  "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"
    }
  },
  "liveMode": true,
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": [
      "string"
    ]
  },
  "currency": "string",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [
        {}
      ],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "isSetupFeeItem": true,
      "type": "one_time",
      "taxInclusive": true
    }
  ],
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "string",
  "title": "string",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "type": "string",
      "size": 10000
    }
  ]
}'

Last updated October 26, 2026

Was this page helpful?