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.
https://app.softsolz.uk/api/v1/services/pipelines/pipelines/deals/{deal_id}/productsRecent Requests
Kept only in this browserPath Params
deal_idstringrequiredHeaders
AuthorizationstringrequiredBearer token: Bearer sk_live_... (or sk_test_... for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
product_idstringCatalogue product to add. Must be a product in this workspace.
price_idstringOne of that product prices. Leave out to use its first price, or its list price when it has none.
descriptionstringLine description. Required without a product; defaults to the product name.
quantitynumberQuantity, more than zero, up to 3 decimal places (default 1). Zero or less is refused with 400 invalid_quantity.
unit_price_centsintegerPrice 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_percentnumberDiscount on the line, 0-100 (default 0). Anything outside that range is refused with 400 invalid_discount.
billing_intervalstringHow 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 }}