SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester

Add a deal line item

Adds a line item and sets the deal value to the sum of its lines (a value change webhook is sent when the value changes). Pick a catalogue product with product_id to take its name, price and billing interval, or send a description and unit_price_cents for a free-text line.

POSThttps://app.softsolz.uk/api/v1/services/pipelines/pipelines/deals/{deal_id}/products

Recent Requests

Kept only in this browser
TimeStatusTook
Send a request with Try it to see it here.

Path Params

deal_idstringrequired

Headers

Authorizationstringrequired

Bearer token: Bearer sk_live_... (or sk_test_... for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

product_idstring

Catalogue product to add. Must be a product in this workspace.

price_idstring

One of that product prices. Leave out to use its first price, or its list price when it has none.

descriptionstring

Line description. Required without a product; defaults to the product name.

quantitynumber

Quantity, more than zero, up to 3 decimal places (default 1). Zero or less is refused with 400 invalid_quantity.

unit_price_centsinteger

Price of one unit in minor units, zero or more. Defaults to the catalogue price, or 0 for a free-text line. A negative price is refused with 400 invalid_unit_price.

discount_percentnumber

Discount on the line, 0-100 (default 0). Anything outside that range is refused with 400 invalid_discount.

billing_intervalstring

How often a free-text line bills. A catalogue product uses its own interval instead.

Response

Response Body

idstringLine id.
deal_idstringDeal the line belongs to.
product_idstring | nullCatalogue product, or null for a free-text line.
price_idstring | nullCatalogue price used, or null.
product_namestring | nullCatalogue product name, or null for a free-text line.
descriptionstringLine description.
quantitynumberQuantity, up to 3 decimal places.
unit_price_centsintegerPrice of one unit in minor units.
discount_percentnumberDiscount on the line, 0-100.
billing_intervalstring | nullHow often the line bills (week, month, quarter, year), or null for one-off.
total_centsintegerQuantity times unit price, less the discount, in minor units.
sort_orderintegerPosition on the deal.

Request

curl --request POST \
--url https://app.softsolz.uk/api/v1/services/pipelines/pipelines/deals/{deal_id}/products \
--header 'Authorization: Bearer sk_live_your_key' \
--header 'Content-Type: application/json' \
--data '{
"description": "Onboarding workshop",
"quantity": 2,
"unit_price_cents": 75000,
"discount_percent": 10
}'

Credentials

Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.

Response · 201

{
"data": {
"id": "19",
"deal_id": "345",
"product_id": null,
"price_id": null,
"product_name": null,
"description": "Onboarding workshop",
"quantity": 2,
"unit_price_cents": 75000,
"discount_percent": 10,
"billing_interval": null,
"total_cents": 135000,
"sort_order": 0
}
}