Schedule

Adds a Line Item to an Invoice Schedule

Required permission: Recurring Invoices - Edit

Most fields only apply to one kind of line, chosen with recurring_type_id; the descriptions say which. POST /schedules/{id}/add_line_item is an older alias for this endpoint and behaves identically.

post/schedules/{id}/line_items

Path parameters

idinteger required

Request body

product_idinteger

Product billed by this line. When given, name, description and product_category default from the product.

namestring

Required unless a product_id supplies one.

descriptionstring

Required unless a product_id supplies one.

quantitynumber

Ignored for the line types that derive their own quantity (asset, contact, remote access, policy folder, vendor and Kabuto subscriptions).

retail_centsinteger

Price charged, in cents.

cost_centsinteger

Your cost, in cents.

price_retailnumber

Price charged, in currency units. Alternative to retail_cents.

price_costnumber

Your cost, in currency units. Alternative to cost_cents.

taxableboolean
positioninteger

Sort order on the generated invoice. Defaults to the bottom of the list.

product_categorystring

Overwritten by the product's own category when product_id is given.

one_time_chargeboolean

Bill this line once and then stop, rather than on every run.

user_idinteger

Employee credited with the line. Defaults to the owner of the API token.

recurring_type_id1 | 2 | 3 | 4 | 6 | 5 | 7 | 8 | 9 | 10 | 11

What kind of line this is, which decides how its quantity is calculated. 1 recurring invoice, 2 data backup, 3 general subscription, 4 asset, 5 Kabuto, 6 contact, 7 Syncro Backup, 8 remote access, 9 policy folder, 10 third-party vendor, 11 Cloudberry.

asset_type_idinteger

Asset subscriptions (recurring_type_id 4): bill for the customer's assets of this type.

saved_asset_search_idinteger

Asset subscriptions: bill for the assets matching this saved search instead of an asset type.

contact_field_type_idinteger

Contact subscriptions (recurring_type_id 6): bill for contacts by this custom field.

contact_field_answer_idinteger

Contact subscriptions: bill only for contacts whose answer to that field is this one.

policy_folder_idinteger

Policy folder subscriptions (recurring_type_id 9): bill for the assets in this folder.

bill_nested_foldersboolean

Policy folder subscriptions: include assets in the folder's sub-folders.

vendor_namestring

Third-party vendor lines (recurring_type_id 10): the vendor to read usage from.

vendor_product_namestring

Third-party vendor lines: the vendor product to bill.

bill_all_unitsboolean

Bill every unit reported, rather than only those over bill_units_threshold.

bill_units_thresholdinteger

Number of units included before billing starts. Required when bill_all_units is false.

include_zero_chargeboolean

Keep the line on the invoice even when it bills nothing.

m365_unit_type'all' | 'consumed'

Microsoft 365 vendor lines: bill licensed (all) or consumed (consumed) seats.

syncro_backup_billing_type'license_count' | 'cloud_storage_usage'

Syncro Backup lines (recurring_type_id 7): bill per licence or per GB of cloud storage.

syncro_backup_credit_type'global_credit' | 'per_asset_credit'

Syncro Backup storage lines: whether the included storage is a global or per-asset allowance.

syncro_backup_bill_allboolean

Syncro Backup lines: bill all usage, ignoring the included allowance.

syncro_backup_bill_after_licensesinteger

Syncro Backup licence lines: licences included before billing starts.

syncro_backup_bill_after_storagenumber

Syncro Backup storage lines: GB included before billing starts.

Response

successful

Changes