Skip to content

Replace Deal Line Items

PUT
/deals/{deal_id}/line-items

Replace a deal’s line items. The FULL set, not a delta.

A non-empty set makes the deal amount the sum of the lines (audited in the deal history). An empty set clears the lines and keeps the typed amount.

Authorizations

Parameters

Path Parameters

deal_id
required

Deal id.

string

Deal id.

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

The FULL desired set of line items. An empty list clears them.

object
line_items
Array<object>

One line item in a replace request. Money is in CENTS.

line_total is not accepted: the server recomputes it from unit_amount, quantity and discount_pct.

object
billing_frequency
Any of:
string
<= 50 characters
description
Any of:
string
<= 2000 characters
discount_pct
number
<= 100
manual_product_id
Any of:
string
product_name
required
string
>= 1 characters <= 500 characters
quantity
integer
default: 1 >= 1 <= 10000
sort_order
integer
stripe_price_id
Any of:
string
stripe_product_id
Any of:
string
unit_amount
required

Unit price in cents.

integer
<= 1000000000

Responses

200

Successful Response

object
data
required

A deal’s line items with its derived amount and quote-mismatch flag.

amount and linked_quote_total are in DOLLARS (the deal’s own unit); line-item money is in cents. amount_mismatch is true when the deal amount and its most authoritative linked quote disagree by more than half a cent.

object
amount
Any of:
number
amount_mismatch
boolean
currency
Any of:
string
deal_id
required
string
line_items
Array<object>

A deal line item. Money fields are in cents.

object
billing_frequency
Any of:
string
description
Any of:
string
discount_pct
required
number
id
required
string
line_total
required
integer
manual_product_id
Any of:
string
product_name
required
string
quantity
required
integer
sort_order
required
integer
stripe_price_id
Any of:
string
stripe_product_id
Any of:
string
unit_amount
required
integer
linked_quote_total
Any of:
number
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string