Skip to main content
POST
/
invoices
/
schedule
/
{scheduleId}
/
cancel
Cancel an scheduled invoice
curl --request POST \
  --url https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Version: <version>' \
  --data '
{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "location"
}
'
{
  "_id": "6578278e879ad2646715ba9c",
  "status": "draft",
  "liveMode": false,
  "altId": "6578278e879ad2646715ba9c",
  "altType": "location",
  "name": "New Invoice",
  "invoices": [
    {
      "_id": "6578278e879ad2646715ba9c",
      "status": "draft",
      "liveMode": false,
      "amountPaid": 0,
      "altId": "6578278e879ad2646715ba9c",
      "altType": "location",
      "name": "New Invoice",
      "businessDetails": {
        "name": "Alex",
        "address": {
          "addressLine1": "9931 Beechwood",
          "city": "St. Houston",
          "state": "TX",
          "countryCode": "USA",
          "postalCode": "559-6993"
        },
        "phoneNo": "+1-214-559-6993",
        "website": "www.example.com"
      },
      "invoiceNumber": "19",
      "currency": "USD",
      "contactDetails": {
        "id": "c6tZZU0rJBf30ZXx9Gli",
        "phoneNo": "+1-214-559-6993",
        "email": "alex@example.com",
        "customFields": [],
        "name": "Alex",
        "address": {
          "countryCode": "US"
        }
      },
      "issueDate": "2023-01-01",
      "dueDate": "2023-01-01",
      "invoiceItems": [
        {
          "taxes": [],
          "_id": "c6tZZU0rJBf30ZXx9Gli",
          "productId": "c6tZZU0rJBf30ZXx9Gli",
          "priceId": "c6tZZU0rJBf30ZXx9Gli",
          "currency": "USD",
          "name": "Macbook Pro",
          "qty": 1,
          "amount": 999
        }
      ],
      "total": 999,
      "title": "INVOICE",
      "amountDue": 999,
      "createdAt": "2023-12-12T09:27:42.355Z",
      "updatedAt": "2023-12-12T09:27:42.355Z",
      "discount": {
        "type": "percentage",
        "value": 0
      },
      "automaticTaxesEnabled": true,
      "automaticTaxesCalculated": true,
      "paymentSchedule": {}
    }
  ],
  "businessDetails": {
    "name": "Alex",
    "address": {
      "addressLine1": "9931 Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "USA",
      "postalCode": "559-6993"
    },
    "phoneNo": "+1-214-559-6993",
    "website": "www.example.com"
  },
  "currency": "USD",
  "contactDetails": {
    "id": "c6tZZU0rJBf30ZXx9Gli",
    "phoneNo": "+1-214-559-6993",
    "email": "alex@example.com",
    "customFields": [],
    "name": "Alex",
    "address": {
      "countryCode": "US"
    }
  },
  "items": [
    {
      "taxes": [],
      "_id": "c6tZZU0rJBf30ZXx9Gli",
      "productId": "c6tZZU0rJBf30ZXx9Gli",
      "priceId": "c6tZZU0rJBf30ZXx9Gli",
      "currency": "USD",
      "name": "Macbook Pro",
      "qty": 1,
      "amount": 999
    }
  ],
  "total": 999,
  "title": "INVOICE",
  "termsNotes": "Confidential",
  "compiledTermsNotes": "Confidential",
  "createdAt": "2023-12-12T09:27:42.355Z",
  "updatedAt": "2023-12-12T09:27:42.355Z",
  "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"
    }
  },
  "discount": {
    "type": "percentage",
    "value": 0
  }
}

Authorizations

Authorization
string
header
required

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Headers

Version
enum<string>
required

API Version

Available options:
2021-07-28

Path Parameters

scheduleId
string
required

Schedule Id

Example:

"6578278e879ad2646715ba9c"

Body

application/json
altId
string
required

location Id / company Id based on altType

Example:

"6578278e879ad2646715ba9c"

altType
enum<string>
required

Alt Type

Available options:
location
Example:

"location"

Response

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

Location Id or Agency Id

Example:

"6578278e879ad2646715ba9c"

altType
enum<string>
required
Available options:
location
name
string
required

Name of the invoice

Example:

"New Invoice"

invoices
object[]
required

List of invoices

businessDetails
object
required
Example:
{
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
}
currency
string
required

Currency

Example:

"USD"

contactDetails
object
required
Example:
{
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": { "countryCode": "US" }
}
items
string[]
required

Invoice Items

Example:
[
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
]
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"

schedule
object
discount
object
Example:
{ "type": "percentage", "value": 0 }
Last modified on March 4, 2026