create_store_order_line
Add a product line item to an existing e-commerce order by specifying product, variant, quantity, and price. Use a unique line ID to prevent duplicates within the order.
Instructions
Add a line item to an existing e-commerce order.
line_id is client-supplied and must be unique within the order; product_id and product_variant_id must reference products that already exist in the store. Manual commerce writes suit custom/headless stores; Shopify and WooCommerce integrations sync order lines automatically.
Args: store_id: E-commerce store ID. Obtain from list_ecommerce_stores. order_id: Order ID to add the line to. line_id: Client-supplied unique ID for the new line (e.g. 'line_1'). product_id: ID of an existing product in the store. product_variant_id: ID of an existing variant of that product. quantity: Quantity ordered. price: Unit price of the line item. additional_fields: Optional dict of extra line fields merged into the body (e.g. discount).
Returns: JSON with the created line object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | ||
| account | No | ||
| line_id | Yes | ||
| order_id | Yes | ||
| quantity | Yes | ||
| store_id | Yes | ||
| product_id | Yes | ||
| additional_fields | No | ||
| product_variant_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |