---
title: "Calculate Line Item Pricing"
method: POST
path: "/estimate/line_items"
---

# Calculate Line Item Pricing

`POST /estimate/line_items`

## Request

- Base URL: `https://dc-region.zuperpro.com/api`
- URL: `https://dc-region.zuperpro.com/api/estimate/line_items`
- Auth: API key in header `x-api-key`

Stateless pricing calculator/preview — despite the path, this does NOT persist anything and takes no estimate_uid. It computes totals, tax, discounts, markup, and bundle roll-ups for an arbitrary line_items array, used by the frontend to preview pricing before saving via create/update estimate.

## Request body

- object
  - `line_items` object[]
    - `line_item_uid` string: Optional; auto-generated if missing/duplicate.
    - `product_uid` string
    - `line_item_type` 'ITEM' | 'HEADER' | 'GROUP'
    - `product_type` 'PRODUCT' | 'SERVICE' | 'PARTS' | 'BUNDLE' | 'LABOR'
    - `quantity` number
    - `unit_price` number
    - `unit_price_premarkup` number: Triggers markup calculation if the company has markup enabled.
    - `discount` number
    - `discount_type` 'FIXED' | 'PERCENTAGE'
    - `group_uid` string
    - `location_uid` string
    - `associated_products` object[]: For BUNDLE items.
    - `tax` object
      - `tax_exempt` boolean
  - `tax` object[]
  - `discount` object
  - `fees` object[]
  - `financing` object
  - `override_total` boolean: Skip backend recompute of total/sub_total and trust client-sent values.

## Response `200`

200

- object
  - `type` string
  - `message` string
  - `data` object
    - `line_items` object[]: Each input line item enriched with total, discount_amount, tax, total_purchase_price, profit, markup fields.
    - `total` number
    - `sub_total` number
    - `total_discount` number
    - `total_markup` number
    - `tax` object[]

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `3c21bc232e16`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zuper/apis/zuper-pro-api/changes/estimate/line_items/post.md)

---

[API](https://skmtc.dev/zuper/apis/zuper-pro-api.md) - [All operations](https://skmtc.dev/zuper/apis/zuper-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zuper/apis/zuper-pro-api/revisions/3c21bc232e16?raw)
