product_id — the component product to add to the bundle.bundle_product_id — the existing bundle product the component is attached to.quantity — how many units of the component the bundle consumes.product_id and bundle_product_id are required and must reference existing products.To build a whole bundle product and its lines in one request, create the product entity instead and send the lines as a nested product_bundlesarray; this endpoint adds one line at a time.
curl --location --globoff 'https://.daftara.com/api2/product_bundle' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "13",
"bundle_product_id": "2",
"quantity": 2,
"unit_name": null,
"unit_factor": null,
"unit_small_name": null,
"unit_factor_id": null
}'{
"message": "Product Bundle Added Successfully",
"id": 1
}