---
title: "Adds a Line Item to an Invoice Schedule"
method: POST
path: "/schedules/{id}/line_items"
tags: ["Schedule"]
---

# Adds a Line Item to an Invoice Schedule

`POST /schedules/{id}/line_items`

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.

## Path parameters

- `id` integer, required

## Request body

- object
  - `product_id` integer — Product billed by this line. When given, `name`, `description` and `product_category` default from the product.
  - `name` string — Required unless a `product_id` supplies one.
  - `description` string — Required unless a `product_id` supplies one.
  - `quantity` number — Ignored for the line types that derive their own quantity (asset, contact, remote access, policy folder, vendor and Kabuto subscriptions).
  - `retail_cents` integer — Price charged, in cents.
  - `cost_cents` integer — Your cost, in cents.
  - `price_retail` number — Price charged, in currency units. Alternative to `retail_cents`.
  - `price_cost` number — Your cost, in currency units. Alternative to `cost_cents`.
  - `taxable` boolean
  - `position` integer — Sort order on the generated invoice. Defaults to the bottom of the list.
  - `product_category` string — Overwritten by the product's own category when `product_id` is given.
  - `one_time_charge` boolean — Bill this line once and then stop, rather than on every run.
  - `user_id` integer — Employee credited with the line. Defaults to the owner of the API token.
  - `recurring_type_id` 1 | 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_id` integer — Asset subscriptions (`recurring_type_id` 4): bill for the customer's assets of this type.
  - `saved_asset_search_id` integer — Asset subscriptions: bill for the assets matching this saved search instead of an asset type.
  - `contact_field_type_id` integer — Contact subscriptions (`recurring_type_id` 6): bill for contacts by this custom field.
  - `contact_field_answer_id` integer — Contact subscriptions: bill only for contacts whose answer to that field is this one.
  - `policy_folder_id` integer — Policy folder subscriptions (`recurring_type_id` 9): bill for the assets in this folder.
  - `bill_nested_folders` boolean — Policy folder subscriptions: include assets in the folder's sub-folders.
  - `vendor_name` string — Third-party vendor lines (`recurring_type_id` 10): the vendor to read usage from.
  - `vendor_product_name` string — Third-party vendor lines: the vendor product to bill.
  - `bill_all_units` boolean — Bill every unit reported, rather than only those over `bill_units_threshold`.
  - `bill_units_threshold` integer — Number of units included before billing starts. Required when `bill_all_units` is false.
  - `include_zero_charge` boolean — 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_all` boolean — Syncro Backup lines: bill all usage, ignoring the included allowance.
  - `syncro_backup_bill_after_licenses` integer — Syncro Backup licence lines: licences included before billing starts.
  - `syncro_backup_bill_after_storage` number — Syncro Backup storage lines: GB included before billing starts.

## Response `200`

successful

## Other responses

- `422` — Invalid request

## Changes

- **2026-09-02** `e3aca54060e1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/syncromsp/apis/syncro/changes/schedules/:id/line_items/post.md)

---

[API](https://skmtc.dev/syncromsp/apis/syncro.md) · [All operations](https://skmtc.dev/syncromsp/apis/syncro/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/syncromsp/syncro/revisions/e3aca54060e1/schema)
