Deal products

A deal product is a line item on a deal: a product (or free-text item) with quantity, unit price, discount and tax. The deal's amount is kept equal to the sum of total_amount_with_tax of its deal products.

Endpoints

MethodPathDescription
GET/deal-productsList deal products
GET/deal-products/:idGet a deal product
POST/deal-productsAdd a product to a deal
PATCH/deal-products/:idUpdate a deal product
DELETE/deal-products/:idRemove a product from a deal

Reads are limited to your API key's organization. Filter by deal_id to get the line items of one deal.

The deal product object

json

Numeric amounts are decimal columns and are returned as strings.

Fields

FieldTypeDescription
idintegerRead-only. Unique ID.
organization_idintegerOrganization that owns the line. Required on create.
deal_idintegerDeal the line belongs to. Required on create.
product_idintegerProduct from the catalog, if the line comes from one.
namestring | nullItem name shown on the deal.
skustring | nullItem SKU.
descriptionstring | nullItem description.
main_media_pathstring | nullImage of the item (storage path or URL), usually the product's main image.
quantitynumberQuantity. Default 0.
pricenumberUnit price. Default 0.
discount_typestringfixed, percentage or none. Default none.
discount_amountnumberDiscount amount for fixed. Default 0.
discount_percentagenumberDiscount percentage for percentage. Default 0.
tax_percentagenumberTax percentage. Default 0.
total_amount_without_taxnumberLine total before tax. Required on create. Not calculated by the API: send the value you want stored.
total_amount_with_taxnumberLine total including tax. Required on create. Not calculated by the API; this is the value added to the deal amount.
created_atstring (date-time)Read-only. Creation time.
updated_atstring (date-time)Read-only. Last update time.
deleted_atstring (date-time) | nullRead-only. Set when the line is removed.

Related

Report an issue with this documentation

Please log in to report issues with our documentation.