Create bid
const url = 'https://app.buildworkpro.com/api/v1/bids';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"bidNumber":"example","name":"example","leadId":1,"contactId":1,"dueDate":"example","validUntil":"example","rejectedAt":"example","cancelReason":"example","cancelledAt":"example","cancelledFromStatus":"example","taxRate":"example","discountType":"example","discount":"example","siteAddress":"example","siteCity":"example","siteState":"example","siteZipCode":"example","latitude":"example","longitude":"example","notes":"example","terms":"example","paymentTermsText":"example","paymentTermId":1,"marginPercent":"example","companyOhPercent":"example","commissionPercent":"example","showSublines":true,"roundSalesAmounts":true,"proposalDetail":"total","proposalShowQuantities":true,"proposalShowUnitPrices":true,"kanbanOrder":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.buildworkpro.com/api/v1/bids \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "bidNumber": "example", "name": "example", "leadId": 1, "contactId": 1, "dueDate": "example", "validUntil": "example", "rejectedAt": "example", "cancelReason": "example", "cancelledAt": "example", "cancelledFromStatus": "example", "taxRate": "example", "discountType": "example", "discount": "example", "siteAddress": "example", "siteCity": "example", "siteState": "example", "siteZipCode": "example", "latitude": "example", "longitude": "example", "notes": "example", "terms": "example", "paymentTermsText": "example", "paymentTermId": 1, "marginPercent": "example", "companyOhPercent": "example", "commissionPercent": "example", "showSublines": true, "roundSalesAmounts": true, "proposalDetail": "total", "proposalShowQuantities": true, "proposalShowUnitPrices": true, "kanbanOrder": 1 }'Creates a new bid in draft status. Fields you omit are filled from the company’s defaults: marginPercent, companyOhPercent and commissionPercent come from the company’s default rates (an omitted, null or blank rate is replaced); validUntil defaults to the company’s bid validity (30 days unless changed) after creation, and sending validUntil: null explicitly means no expiry; terms defaults to the company’s default terms template (or the legacy default terms text). Payment terms are never defaulted. The margin, overhead and commission combination is now validated on create: a combination that totals 100% or more returns 400/422 instead of being stored. Callers that relied on omitted fields being empty (Zapier zaps, scripts) will now see these values on the created bid.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Idempotent retry key for mutating operations. The first request with a given key executes normally and BuildWorkPro caches the response. Replaying the same key with the same request body (method + path + JSON body, SHA-256 hashed) returns the cached response without re-executing the mutation. Replaying with a DIFFERENT body returns 409 idempotency_key_reused. The cache TTL is 24 hours; after expiry the key is treated as a new operation. Keys are tenant-scoped. Recommended: a fresh UUID v4 per logical operation.
Request Body
Section titled “ Request Body ”object
Bid-level sales tax rate. A percent, not a fraction: 7 means 7% (send 7, not 0.07). 0-100, at most 3 decimal places.
Discount amount, or a percent when discountType is “percentage”. At most 2 decimal places.
Margin as a percent of the selling price (18 means 18%). At most 2 decimal places.
Company overhead as a percent of the selling price (10 means 10%). At most 2 decimal places.
Sales commission as a percent of the selling price. At most 2 decimal places.
Deprecated alias for proposalDetail. true maps to full; false maps to line_items, except a bid already at total stays total. Ignored when proposalDetail is sent. Responses derive this as proposalDetail === full.
What the customer sees on the proposal PDF and share page: total (a scope paragraph and the totals, no line table), line_items (the line table, no sub-lines) or full (the line table with each line’s sub-lines).
Print the Qty column on the proposal.
Print the Unit price column on the proposal.
Responses
Section titled “ Responses ”Created
object
object
Present on GET /bids/{id}. unitPrice and total are pre-markup cost; customerUnitPrice and customerTotal are the customer-facing prices. Omitted from list responses.
object
Item = priced line; section = header grouping the rows after it; note = customer-visible text.
An optional (alternate) priced line, quoted outside the bid total.
Human-friendly mark name, e.g. W-01. Null on section and note rows.
Quantity. Sections and notes are not priced.
Pre-markup direct cost per unit (before margin, overhead, commission, and distributed project costs). Not the customer price — use customerUnitPrice.
Pre-markup line cost. Summing these does not equal the bid subtotal. Use customerTotal.
Customer-facing unit price after markup and this line’s share of distributed costs. Null on section and note rows. An optional line is priced on its own and is excluded from the bid subtotal.
Customer-facing line total in dollars, reconciled to the cent. Null on section and note rows. The sum over priced, non-optional lines equals the bid’s pre-discount subtotal.
Per-line sales-tax rate (0–100). Null inherits the bid’s tax rate; 0 exempts the line.
Per-line purchase-tax rate (0–100) on a flat line’s cost. Null inherits the product’s rate.
Sort position within the bid. A section covers every following row until the next section.
Read-only. Present on GET /bids/{id}. True for the onboarding practice bid a user sends to themselves; it becomes a normal bid (false) once it is sent to anyone outside the organization.
What the customer sees: total (a scope paragraph and the totals, no line table), line_items (the line table, no sub-lines) or full (the line table with each line’s sub-lines).
Whether the proposal prints the Qty column.
Whether the proposal prints the Unit price column.
Deprecated alias for proposalDetail. true maps to full; false maps to line_items, except a bid already at total stays total. Ignored when proposalDetail is sent. Responses derive this as proposalDetail === full.
object
Server-generated request identifier
object
Opaque cursor for the next page; null when no more results
Whether more pages are available after this one
Items in this page
Example
{ "data": { "lineItems": [ { "kind": "item" } ], "proposalDetail": "total" }}Error
object
URL identifying the problem type
Short human-readable summary
HTTP status code
Human-readable explanation
Server-generated request identifier
Validation error array (422 only)
object
Field path that failed validation
Validation error code
Human-readable validation message
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}