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
| Method | Path | Description |
|---|---|---|
GET | /deal-products | List deal products |
GET | /deal-products/:id | Get a deal product |
POST | /deal-products | Add a product to a deal |
PATCH | /deal-products/:id | Update a deal product |
DELETE | /deal-products/:id | Remove 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
| Field | Type | Description |
|---|---|---|
id | integer | Read-only. Unique ID. |
organization_id | integer | Organization that owns the line. Required on create. |
deal_id | integer | Deal the line belongs to. Required on create. |
product_id | integer | Product from the catalog, if the line comes from one. |
name | string | null | Item name shown on the deal. |
sku | string | null | Item SKU. |
description | string | null | Item description. |
main_media_path | string | null | Image of the item (storage path or URL), usually the product's main image. |
quantity | number | Quantity. Default 0. |
price | number | Unit price. Default 0. |
discount_type | string | fixed, percentage or none. Default none. |
discount_amount | number | Discount amount for fixed. Default 0. |
discount_percentage | number | Discount percentage for percentage. Default 0. |
tax_percentage | number | Tax percentage. Default 0. |
total_amount_without_tax | number | Line total before tax. Required on create. Not calculated by the API: send the value you want stored. |
total_amount_with_tax | number | Line total including tax. Required on create. Not calculated by the API; this is the value added to the deal amount. |
created_at | string (date-time) | Read-only. Creation time. |
updated_at | string (date-time) | Read-only. Last update time. |
deleted_at | string (date-time) | null | Read-only. Set when the line is removed. |
Related
Report an issue with this documentation
Please log in to report issues with our documentation.