{"openapi":"3.1.0","info":{"title":"DeckBuild API","version":"2026-10-16","description":"Read your DeckBuild jobs, versions, takeoffs, estimates and proposals. Authenticate with an API key created in Settings > API: `Authorization: Bearer dbk_live_...`. Money is integer cents; times are ISO 8601. Fields are only ever added, never removed."},"servers":[{"url":"https://api.deckbuild.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Company"},{"name":"Jobs"},{"name":"Versions"},{"name":"Proposals"}],"paths":{"/company":{"get":{"operationId":"getCompany","tags":["Company"],"summary":"The company and key behind this request","description":"Confirms a key works and shows what it may read. Needs no permission.","x-deckbuild-scopes":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Company"}},"required":["data"]},"example":{"data":{"id":"36df67a5-984b-4f43-95da-a2926842f918","name":"Example Deck Co.","key":{"id":"9b2d4f6a-1c3e-4a5b-8d7f-0e2c4a6b8d0f","name":"Estimating agent","scopes":["estimates:read","jobs:read"],"api_version":"2026-10-16"}}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"get":{"operationId":"listJobs","tags":["Jobs"],"summary":"List jobs","description":"Most recently changed first, or oldest first for syncing. A job's updated_at moves when the job or any of its versions is edited, and when it is archived or restored. Archived jobs only appear with include_archived=true.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this ISO 8601 time","schema":{"type":"string","format":"date-time"}},{"name":"order","in":"query","required":false,"description":"newest_first (default) or oldest_first, the order to sync in","schema":{"type":"string","enum":["newest_first","oldest_first"]}},{"name":"status_id","in":"query","required":false,"description":"Only jobs with this status","schema":{"type":"string","format":"uuid"}},{"name":"number","in":"query","required":false,"description":"Only the job with this job number (exact match)","schema":{"type":"string"}},{"name":"include_archived","in":"query","required":false,"description":"true: archived jobs too, with archived_at set","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page"},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"example":{"data":[{"id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","name":"Smith Deck","number":"J-1042","status":{"id":"6a1f2c4e-8b0d-4e1a-9c3b-5d7e9f1a2b3c","name":"Sold","is_sold":true},"building_code":"2021","app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d","created_at":"2026-10-01T15:04:22.118Z","updated_at":"2026-10-14T19:41:07.552Z","archived_at":null,"customer":{"name":"Pat Smith","email":"pat.smith@example.com","phone":"515-555-0142","secondary_contact":null,"address":{"full":"1218 Grand Ave, Des Moines, IA 50309","street_number":"1218","street":"Grand Ave","city":"Des Moines","state":"IA","zip":"50309"}}}],"next_cursor":null,"has_more":false}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{job_id}":{"get":{"operationId":"getJob","tags":["Jobs"],"summary":"Get a job","description":"customer is filled only for keys with customers:read. An archived job answers 404 unless include_archived=true.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's id","schema":{"type":"string","format":"uuid"}},{"name":"include_archived","in":"query","required":false,"description":"true: archived jobs too, with archived_at set","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Job"}},"required":["data"]},"example":{"data":{"id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","name":"Smith Deck","number":"J-1042","status":{"id":"6a1f2c4e-8b0d-4e1a-9c3b-5d7e9f1a2b3c","name":"Sold","is_sold":true},"building_code":"2021","app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d","created_at":"2026-10-01T15:04:22.118Z","updated_at":"2026-10-14T19:41:07.552Z","archived_at":null,"customer":{"name":"Pat Smith","email":"pat.smith@example.com","phone":"515-555-0142","secondary_contact":null,"address":{"full":"1218 Grand Ave, Des Moines, IA 50309","street_number":"1218","street":"Grand Ave","city":"Des Moines","state":"IA","zip":"50309"}}}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/job-statuses":{"get":{"operationId":"listJobStatuses","tags":["Jobs"],"summary":"List job statuses","description":"The company's statuses in display order, archived ones included and marked.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JobStatus"}}},"required":["data"]},"example":{"data":[{"id":"6a1f2c4e-8b0d-4e1a-9c3b-5d7e9f1a2b3c","name":"Sold","position":30,"is_default":false,"is_sold":true,"archived":false}]}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{job_id}/versions":{"get":{"operationId":"listJobVersions","tags":["Versions"],"summary":"List a job's versions","description":"Oldest first, each with the proposals made from it.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Version"}}},"required":["data"]},"example":{"data":[{"id":"a17cf02c-db02-405e-b595-465755bb323e","job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","name":"Option A: 16x20 composite","parent_version_id":null,"created_at":"2026-10-01T15:04:22.118Z","updated_at":"2026-10-12T01:13:46.000Z","drawing_updated_at":"2026-10-08T21:02:10.000Z","sold":{"sold_at":"2026-10-12T01:13:46.000Z","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77"},"app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d/versions/a17cf02c-db02-405e-b595-465755bb323e","proposals":[{"id":"82361030-0244-4185-ac1d-18dfc8bebf77","number":1,"name":"Smith Deck, composite","status":"signed","sent_at":"2026-10-09T16:20:00.000Z","signed_at":"2026-10-12T01:13:45.000Z","total_cents":2430000}]}]}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/versions/{version_id}":{"get":{"operationId":"getVersion","tags":["Versions"],"summary":"Get a version","description":"With its proposals and whether it has been sold.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"version_id","in":"path","required":true,"description":"The version's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Version"}},"required":["data"]},"example":{"data":{"id":"a17cf02c-db02-405e-b595-465755bb323e","job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","name":"Option A: 16x20 composite","parent_version_id":null,"created_at":"2026-10-01T15:04:22.118Z","updated_at":"2026-10-12T01:13:46.000Z","drawing_updated_at":"2026-10-08T21:02:10.000Z","sold":{"sold_at":"2026-10-12T01:13:46.000Z","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77"},"app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d/versions/a17cf02c-db02-405e-b595-465755bb323e","proposals":[{"id":"82361030-0244-4185-ac1d-18dfc8bebf77","number":1,"name":"Smith Deck, composite","status":"signed","sent_at":"2026-10-09T16:20:00.000Z","signed_at":"2026-10-12T01:13:45.000Z","total_cents":2430000}]}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/versions/{version_id}/takeoff":{"get":{"operationId":"getVersionTakeoff","tags":["Versions"],"summary":"Get a version's material takeoff","description":"Every line, as the takeoff screen's CSV export has it. A sold version returns the takeoff it was sold with. Cost fields need costs:read.\n\nNeeds: estimates:read.","x-deckbuild-scopes":["estimates:read"],"parameters":[{"name":"version_id","in":"path","required":true,"description":"The version's id","schema":{"type":"string","format":"uuid"}},{"name":"supplier","in":"query","required":false,"description":"Only this supplier's lines. Repeat for several.","schema":{"type":"string"}},{"name":"inventory","in":"query","required":false,"description":"all (default), exclude, or only lines from your own stock","schema":{"type":"string","enum":["all","exclude","only"]}},{"name":"purchase_list","in":"query","required":false,"description":"true: what a material order contains (no stock, no per-job fees, no zero quantities). Cannot be combined with inventory=only.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Takeoff"}},"required":["data"]},"example":{"data":{"version_id":"a17cf02c-db02-405e-b595-465755bb323e","sold":true,"lines":[{"line_key":"ln_3f9a1c27b84e60d5a2c1","group":"Lumber","description":"2x10 PT Joist","size":"2x10x16","color":null,"sku":"PT21016","supplier":"Lumberyard","quantity":24,"unit":"ea","from_inventory":false,"pieces_needed":null,"pieces_per_package":null,"edited":false,"note":null,"unit_cost_cents":3150,"extended_cost_cents":75600,"billable_cost_cents":75600,"taxable":true},{"line_key":"ln_8e02d4b7c19f3a6e5b70","group":"Decking","description":"Trex Transcend grooved board","size":"1x6x20","color":"Spiced Rum","sku":null,"supplier":"Lumberyard","quantity":38,"unit":"ea","from_inventory":false,"pieces_needed":null,"pieces_per_package":null,"edited":true,"note":null,"unit_cost_cents":null,"extended_cost_cents":null,"billable_cost_cents":null,"taxable":null}],"totals":{"line_count":2,"material_cost_cents":null,"billable_material_cents":null,"taxable_material_cost_cents":null,"groups":[{"group":"Lumber","cost_cents":null},{"group":"Decking","cost_cents":null}]}}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals":{"get":{"operationId":"listProposals","tags":["Proposals"],"summary":"List proposals","description":"Every proposal in the company, most recently changed first. Sending, signing or declining a proposal moves the proposal's updated_at, not the job's, so sync proposals here.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 200 (default 50)","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page","schema":{"type":"string"}},{"name":"updated_since","in":"query","required":false,"description":"Only records changed at or after this ISO 8601 time","schema":{"type":"string","format":"date-time"}},{"name":"order","in":"query","required":false,"description":"newest_first (default) or oldest_first, the order to sync in","schema":{"type":"string","enum":["newest_first","oldest_first"]}},{"name":"status","in":"query","required":false,"description":"Only proposals with this status","schema":{"type":"string","enum":["draft","sent","viewed","signed","declined","completed"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Proposal"}},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page"},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"example":{"data":[{"id":"82361030-0244-4185-ac1d-18dfc8bebf77","number":1,"name":"Smith Deck, composite","status":"signed","sent_at":"2026-10-09T16:20:00.000Z","signed_at":"2026-10-12T01:13:45.000Z","total_cents":2430000,"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","current_revision":2,"display_mode":"lump_sum","valid_until":"2026-11-08","deposit_paid_at":"2026-10-13T14:00:00.000Z","app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d/proposals/82361030-0244-4185-ac1d-18dfc8bebf77","created_at":"2026-10-02T13:10:00.000Z","updated_at":"2026-10-13T14:00:00.000Z"}],"next_cursor":null,"has_more":false}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{job_id}/proposals":{"get":{"operationId":"listJobProposals","tags":["Proposals"],"summary":"List a job's proposals","description":"In proposal-number order, with status, dates and the total as last sent.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Proposal"}}},"required":["data"]},"example":{"data":[{"id":"82361030-0244-4185-ac1d-18dfc8bebf77","number":1,"name":"Smith Deck, composite","status":"signed","sent_at":"2026-10-09T16:20:00.000Z","signed_at":"2026-10-12T01:13:45.000Z","total_cents":2430000,"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","current_revision":2,"display_mode":"lump_sum","valid_until":"2026-11-08","deposit_paid_at":"2026-10-13T14:00:00.000Z","app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d/proposals/82361030-0244-4185-ac1d-18dfc8bebf77","created_at":"2026-10-02T13:10:00.000Z","updated_at":"2026-10-13T14:00:00.000Z"}]}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{proposal_id}":{"get":{"operationId":"getProposal","tags":["Proposals"],"summary":"Get a proposal","description":"Status, dates and the total as last sent. total_cents needs estimates:read.\n\nNeeds: jobs:read.","x-deckbuild-scopes":["jobs:read"],"parameters":[{"name":"proposal_id","in":"path","required":true,"description":"The proposal's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proposal"}},"required":["data"]},"example":{"data":{"id":"82361030-0244-4185-ac1d-18dfc8bebf77","number":1,"name":"Smith Deck, composite","status":"signed","sent_at":"2026-10-09T16:20:00.000Z","signed_at":"2026-10-12T01:13:45.000Z","total_cents":2430000,"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","current_revision":2,"display_mode":"lump_sum","valid_until":"2026-11-08","deposit_paid_at":"2026-10-13T14:00:00.000Z","app_url":"https://deckbuild.com/jobs/4f8e5fa1-2706-4999-9f16-ead6266e067d/proposals/82361030-0244-4185-ac1d-18dfc8bebf77","created_at":"2026-10-02T13:10:00.000Z","updated_at":"2026-10-13T14:00:00.000Z"}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{proposal_id}/estimate":{"get":{"operationId":"getProposalEstimate","tags":["Proposals"],"summary":"Get a proposal's price breakdown","description":"Sent proposals answer frozen, as the customer saw them; drafts are priced live. internal (costs, margin, commission) needs costs:read.\n\nNeeds: estimates:read.","x-deckbuild-scopes":["estimates:read"],"parameters":[{"name":"proposal_id","in":"path","required":true,"description":"The proposal's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Estimate"}},"required":["data"]},"example":{"data":{"proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","version_id":"a17cf02c-db02-405e-b595-465755bb323e","source":"sent","revision":2,"priced_at":"2026-10-09T16:20:00.000Z","customer_price":{"list_price_cents":2270000,"discount_cents":0,"sell_price_cents":2270000,"tax_cents":0,"total_cents":2270000,"total_with_options_cents":2430000,"groups":[{"group":"Framing","price_cents":820000},{"group":"Decking","price_cents":960000},{"group":"Railing","price_cents":490000}],"discounts":[],"upgrades":[{"name":"Hidden fasteners","price_cents":160000,"selected":true}],"labor":[{"name":"Framing","quantity":320,"group":"Framing"}],"other_costs":[{"name":"Building permit","kind":"permit_fee","group":"Fees"}]},"internal_costs":null}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{proposal_id}/payment-schedule":{"get":{"operationId":"getProposalPaymentSchedule","tags":["Proposals"],"summary":"Get a proposal's payment schedule","description":"Progress payments as amounts in cents, resolved against the total the customer was shown (total_with_options_cents), with paid dates.\n\nNeeds: estimates:read.","x-deckbuild-scopes":["estimates:read"],"parameters":[{"name":"proposal_id","in":"path","required":true,"description":"The proposal's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PaymentSchedule"}},"required":["data"]},"example":{"data":{"proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","source":"sent","total_cents":2430000,"milestones":[{"position":1,"label":"Deposit","kind":"percent","percent":30,"amount_cents":729000,"paid_at":"2026-10-13T14:00:00.000Z"},{"position":2,"label":"Balance on completion","kind":"remaining","percent":null,"amount_cents":1701000,"paid_at":null}],"financing":{"plan_name":"12 months same as cash","lender":"Wisetack","paid_to":"builder","apr_pct":0,"term_months":12,"down_payment_cents":230000,"financed_cents":2200000,"monthly_cents":183333,"schedule":[{"position":1,"label":"Down payment, due at signing","payer":"homeowner","amount_cents":230000},{"position":2,"label":"At completion","payer":"lender","amount_cents":2200000}]}}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{proposal_id}/documents":{"get":{"operationId":"listProposalDocuments","tags":["Proposals"],"summary":"Get download links for a proposal's PDFs","description":"As the customer received them; links expire after 5 minutes. The drawing is the Plan View page sent with the proposal; the full drawing set (3D, elevations, connection details, post loads) comes with a material order, and the plot plan from GET /versions/{version_id}/plot-plan. The drawing needs drawings:read. The proposal PDF and signed copies need proposal_documents:read, estimates:read and customers:read, because prices and the customer's details are printed on them. The AI rendering the customer saw (rendering_image) and, when it was made on a photo of their house, that photo (rendering_before_photo) follow the same rule as the proposal PDF. Files a key may not have are left out.\n\nNeeds one of: drawings:read, proposal_documents:read.","x-deckbuild-scopes":[],"x-deckbuild-any-scopes":["drawings:read","proposal_documents:read"],"parameters":[{"name":"proposal_id","in":"path","required":true,"description":"The proposal's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProposalDocuments"}},"required":["data"]},"example":{"data":{"proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","revision":2,"documents":[{"kind":"drawing_pdf","filename":"Smith Deck, composite Drawing.pdf","url":"https://files.deckbuild.com/signed/...","expires_at":"2026-10-16T14:07:11.000Z"}]}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/versions/{version_id}/material-orders":{"get":{"operationId":"listVersionMaterialOrders","tags":["Versions"],"summary":"List material orders sent to suppliers","description":"Newest first, up to 50 (Send to Lumberyard in the app). The drawing file is the full drawing set as the rep exported it for the order; it needs drawings:read and customers:read, because its title block prints the job address; the material list needs costs:read too when the order was sent with costs; order_value_cents needs costs:read.\n\nNeeds: material_orders:read, estimates:read.","x-deckbuild-scopes":["material_orders:read","estimates:read"],"parameters":[{"name":"version_id","in":"path","required":true,"description":"The version's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MaterialOrder"}}},"required":["data"]},"example":{"data":[{"id":"c0ffee00-1234-4abc-8def-0123456789ab","job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","status":"sent","fulfillment":"delivery","delivery":{"day":"2026-10-20","time":"Morning","location":"Driveway, left side"},"po_number":"PO-88213","note":null,"suppliers":["Lumberyard"],"included_costs":false,"included_inventory":false,"line_count":31,"order_value_cents":null,"recipients":[{"email":"orders@example-lumber.com","status":"delivered"}],"created_at":"2026-10-12T15:30:00.000Z","completed_at":"2026-10-12T15:30:04.000Z","files":[{"kind":"material_list_csv","filename":"Smith Deck Material List.csv","url":"https://files.deckbuild.com/signed/...","expires_at":"2026-10-16T14:07:11.000Z"}]}]}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/material-orders/{order_id}":{"get":{"operationId":"getMaterialOrder","tags":["Versions"],"summary":"Get one material order","description":"With fresh file links, under the same file rules as the list.\n\nNeeds: material_orders:read, estimates:read.","x-deckbuild-scopes":["material_orders:read","estimates:read"],"parameters":[{"name":"order_id","in":"path","required":true,"description":"The material order's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MaterialOrder"}},"required":["data"]},"example":{"data":{"id":"c0ffee00-1234-4abc-8def-0123456789ab","job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","status":"sent","fulfillment":"delivery","delivery":{"day":"2026-10-20","time":"Morning","location":"Driveway, left side"},"po_number":"PO-88213","note":null,"suppliers":["Lumberyard"],"included_costs":false,"included_inventory":false,"line_count":31,"order_value_cents":null,"recipients":[{"email":"orders@example-lumber.com","status":"delivered"}],"created_at":"2026-10-12T15:30:00.000Z","completed_at":"2026-10-12T15:30:04.000Z","files":[{"kind":"material_list_csv","filename":"Smith Deck Material List.csv","url":"https://files.deckbuild.com/signed/...","expires_at":"2026-10-16T14:07:11.000Z"}]}}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/versions/{version_id}/plot-plan":{"get":{"operationId":"getVersionPlotPlan","tags":["Versions"],"summary":"Download a version's plot plan","description":"The Plot Plan sheet as a PDF, built from the saved plot plan when you ask, the same sheet the Plot Plan page downloads. The response body is the PDF, not a link. Needs customers:read too, because the sheet prints the job address. A version with no plot plan drawn answers 404.\n\nNeeds: drawings:read, customers:read.","x-deckbuild-scopes":["drawings:read","customers:read"],"parameters":[{"name":"version_id","in":"path","required":true,"description":"The version's id","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The PDF itself (Content-Disposition names the file)","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"description":"invalid_request: a query parameter or cursor is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, key_revoked or key_expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"subscription_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"api_disabled or insufficient_scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such record in your company (also for a malformed id, and for a record on an archived job)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: wait Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal_error: quote the request_id to support","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"job.created":{"post":{"summary":"A job is created","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"job.created","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"job.updated":{"post":{"summary":"A job's name, number, status or customer details change","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"job.updated","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"job.archived":{"post":{"summary":"A job is archived","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"job.archived","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"proposal.sent":{"post":{"summary":"A proposal is sent to the customer","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"proposal.sent","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"proposal.viewed":{"post":{"summary":"The customer opens a proposal","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"proposal.viewed","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"proposal.signed":{"post":{"summary":"The customer signs a proposal (online or on paper)","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"proposal.signed","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"proposal.completed":{"post":{"summary":"A proposal is fully signed by both sides","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"proposal.completed","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"proposal.declined":{"post":{"summary":"A proposal is marked declined","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"proposal.declined","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"payment.recorded":{"post":{"summary":"A deposit or progress payment is marked paid","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"payment.recorded","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}},"version.sold":{"post":{"summary":"A version is sold (its takeoff is frozen)","description":"Signed per Standard Webhooks (standardwebhooks.com). Verify the webhook-signature header with your endpoint secret before trusting the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"},"example":{"id":"b553d4d6-daa4-4d60-9c12-86d33f60abc6","company_id":"36df67a5-984b-4f43-95da-a2926842f918","type":"version.sold","created_at":"2026-10-12T01:13:46.204Z","data":{"job_id":"4f8e5fa1-2706-4999-9f16-ead6266e067d","version_id":"a17cf02c-db02-405e-b595-465755bb323e","proposal_id":"82361030-0244-4185-ac1d-18dfc8bebf77","proposal_number":1,"status":"sold"}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"dbk_live_...","description":"Scopes: jobs:read (Jobs), customers:read (Customer contact details), estimates:read (Estimates and takeoff), costs:read (Internal costs), drawings:read (Drawings), proposal_documents:read (Proposal documents), material_orders:read (Material order files)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. key_revoked"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"Company":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":"string"},"key":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["jobs:read","customers:read","estimates:read","costs:read","drawings:read","proposal_documents:read","material_orders:read"]}},"api_version":{"type":"string"}},"required":["id","name","scopes","api_version"]}},"required":["id","name","key"]},"Job":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":"string"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/JobStatusRef"},{"type":"null"}]},"building_code":{"type":"string","description":"The building code edition the version follows, e.g. 2021"},"app_url":{"type":"string","description":"Opens the job in DeckBuild"},"created_at":{"type":"string","description":"ISO 8601 date-time"},"updated_at":{"type":"string","description":"ISO 8601 date-time"},"archived_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}],"description":"Set when the job was archived; archived jobs only appear with include_archived=true"},"customer":{"anyOf":[{"$ref":"#/components/schemas/Customer"},{"type":"null"}]}},"required":["id","name","number","status","building_code","app_url","created_at","updated_at","archived_at","customer"]},"JobStatusRef":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":"string"},"is_sold":{"type":"boolean"}},"required":["id","name","is_sold"]},"JobStatus":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"name":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"is_default":{"type":"boolean"},"is_sold":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["id","name","position","is_default","is_sold","archived"]},"Customer":{"type":"object","properties":{"name":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"secondary_contact":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","phone"]},{"type":"null"}]},"address":{"type":"object","properties":{"full":{"anyOf":[{"type":"string"},{"type":"null"}]},"street_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Two-letter state code"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["full","street_number","street","city","state","zip"]}},"required":["name","email","phone","secondary_contact","address"],"description":"Needs customers:read; null without it."},"Version":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"job_id":{"type":"string","description":"UUID"},"name":{"type":"string"},"parent_version_id":{"anyOf":[{"type":"string","description":"UUID"},{"type":"null"}],"description":"The version this one was copied from"},"created_at":{"type":"string","description":"ISO 8601 date-time"},"updated_at":{"type":"string","description":"ISO 8601 date-time"},"drawing_updated_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}],"description":"When DeckBuild last recalculated the drawing and takeoff, which happens in the app after the version is edited. Reading through the API never changes it"},"sold":{"anyOf":[{"type":"object","properties":{"sold_at":{"type":"string","description":"ISO 8601 date-time"},"proposal_id":{"anyOf":[{"type":"string","description":"UUID"},{"type":"null"}]}},"required":["sold_at","proposal_id"]},{"type":"null"}]},"app_url":{"type":"string"},"proposals":{"type":"array","items":{"$ref":"#/components/schemas/ProposalSummary"}}},"required":["id","job_id","name","parent_version_id","created_at","updated_at","drawing_updated_at","sold","app_url","proposals"],"description":"A version: one of a job's versions in the app"},"ProposalSummary":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","viewed","signed","declined","completed"],"description":"viewed: the customer opened it. signed: the customer signed, awaiting your countersignature. completed: fully signed by both."},"sent_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"signed_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"total_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer pays, tax included, as last sent. Needs estimates:read."}},"required":["id","number","name","status","sent_at","signed_at","total_cents"]},"Proposal":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","viewed","signed","declined","completed"],"description":"viewed: the customer opened it. signed: the customer signed, awaiting your countersignature. completed: fully signed by both."},"sent_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"signed_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"total_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer pays, tax included, as last sent. Needs estimates:read."},"job_id":{"type":"string","description":"UUID"},"version_id":{"type":"string","description":"UUID"},"current_revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"display_mode":{"type":"string","description":"lump_sum or by_group: how the proposal presents its price"},"valid_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"deposit_paid_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"app_url":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 date-time"},"updated_at":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","number","name","status","sent_at","signed_at","total_cents","job_id","version_id","current_revision","display_mode","valid_until","deposit_paid_at","app_url","created_at","updated_at"]},"Takeoff":{"type":"object","properties":{"version_id":{"type":"string","description":"UUID"},"sold":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TakeoffLine"}},"totals":{"type":"object","properties":{"line_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"material_cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"billable_material_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"taxable_material_cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"groups":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["group","cost_cents"]}}},"required":["line_count","material_cost_cents","billable_material_cents","taxable_material_cost_cents","groups"]}},"required":["version_id","sold","lines","totals"]},"TakeoffLine":{"type":"object","properties":{"line_key":{"type":"string","description":"Stable id of the line within this version, the same on every call"},"group":{"type":"string"},"description":{"type":"string"},"size":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier":{"type":"string"},"quantity":{"type":"number","description":"Order quantity in purchase units"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_inventory":{"type":"boolean","description":"Pulled from your own stock, not ordered"},"pieces_needed":{"anyOf":[{"type":"number"},{"type":"null"}]},"pieces_per_package":{"anyOf":[{"type":"number"},{"type":"null"}]},"edited":{"type":"boolean","description":"Quantity or color was set by hand"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"unit_cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Needs costs:read"},"extended_cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Needs costs:read"},"billable_cost_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Needs costs:read"},"taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Needs costs:read"}},"required":["line_key","group","description","size","color","sku","supplier","quantity","unit","from_inventory","pieces_needed","pieces_per_package","edited","note","unit_cost_cents","extended_cost_cents","billable_cost_cents","taxable"]},"Estimate":{"type":"object","properties":{"proposal_id":{"type":"string","description":"UUID"},"version_id":{"type":"string","description":"UUID"},"source":{"type":"string","enum":["sent","live"],"description":"sent: frozen as the customer saw it. live: a draft, priced now."},"revision":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"priced_at":{"type":"string","description":"ISO 8601 date-time"},"customer_price":{"type":"object","properties":{"list_price_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sell_price_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"After discounts, before tax"},"tax_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_with_options_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The total with the options the rep pre-selected: the starting price the customer was shown. Equals total_cents for a draft priced live."},"groups":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"price_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["group","price_cents"]}},"discounts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"value":{"type":"number"}},"required":["kind","value"]}},"upgrades":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"price_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"selected":{"type":"boolean"}},"required":["name","price_cents","selected"]}},"labor":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"number"},"group":{"type":"string"}},"required":["name","quantity","group"]},"description":"Labor on the job; items at quantity 0 are left out"},"other_costs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"group":{"type":"string"}},"required":["name","kind","group"]},"description":"Permits, professional fees and fixed adjustments, by name"}},"required":["list_price_cents","discount_cents","sell_price_cents","tax_cents","total_cents","total_with_options_cents","groups","discounts","upgrades","labor","other_costs"]},"internal_costs":{"anyOf":[{"type":"object","properties":{"material_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"materials_tax_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"labor_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fixed_and_fee_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"haul_away_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"demo_other_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upgrade_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"base_cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"commission_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"commission_handling":{"type":"string"},"margin_pct":{"type":"number"},"effective_margin_pct":{"type":"number"},"margin_dollars_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"markup_multiplier":{"type":"number"},"tax_rate_pct":{"type":"number"},"tax_applies_to":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["group","cost_cents"]}},"labor":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mode":{"type":"string","description":"employee or sub"},"quantity":{"type":"number"},"employee_hours_per_unit":{"type":"number"},"sub_cost_cents_per_unit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"loaded_rate_cents_per_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","mode","quantity","employee_hours_per_unit","sub_cost_cents_per_unit","loaded_rate_cents_per_hour"]}},"other_costs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pct_of_price":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name","kind","amount_cents","pct_of_price"]}},"upgrades":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"cost_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","cost_cents"]}}},"required":["material_cost_cents","materials_tax_cents","labor_cost_cents","fixed_and_fee_cost_cents","haul_away_cost_cents","demo_other_cost_cents","upgrade_cost_cents","base_cost_cents","commission_cents","commission_handling","margin_pct","effective_margin_pct","margin_dollars_cents","markup_multiplier","tax_rate_pct","tax_applies_to","groups","labor","other_costs","upgrades"]},{"type":"null"}],"description":"Needs costs:read; null without it."}},"required":["proposal_id","version_id","source","revision","priced_at","customer_price","internal_costs"]},"PaymentSchedule":{"type":"object","properties":{"proposal_id":{"type":"string","description":"UUID"},"source":{"type":"string","enum":["sent","live"]},"total_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"milestones":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"kind":{"type":"string","enum":["percent","fixed","remaining"]},"percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"paid_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]}},"required":["position","label","kind","percent","amount_cents","paid_at"]}},"financing":{"anyOf":[{"type":"object","properties":{"plan_name":{"type":"string"},"lender":{"anyOf":[{"type":"string"},{"type":"null"}]},"paid_to":{"type":"string","enum":["homeowner","builder"],"description":"Who the lender pays. homeowner: the milestones above stand. builder: `schedule` replaces them."},"apr_pct":{"type":"number"},"term_months":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"down_payment_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"financed_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthly_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Estimated monthly loan payment."},"schedule":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"payer":{"type":"string","enum":["homeowner","lender"]},"amount_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["position","label","payer","amount_cents"]},"description":"When the lender pays the builder: the down payment, then the lender's draws. The milestones above apply only if the loan is not approved. Empty when the lender pays the homeowner."}},"required":["plan_name","lender","paid_to","apr_pct","term_months","down_payment_cents","financed_cents","monthly_cents","schedule"]},{"type":"null"}],"description":"The financing plan the homeowner signed with. null when unsigned or paid in full."}},"required":["proposal_id","source","total_cents","milestones","financing"]},"DocumentLink":{"type":"object","properties":{"kind":{"type":"string","description":"proposal_pdf, drawing_pdf, signed_pdf, signed_scan, rendering_image, rendering_before_photo, material_list_csv or material_list_xlsx"},"filename":{"type":"string"},"url":{"type":"string","description":"Temporary download link"},"expires_at":{"type":"string","description":"Links last 5 minutes; ask again for a fresh one"}},"required":["kind","filename","url","expires_at"]},"ProposalDocuments":{"type":"object","properties":{"proposal_id":{"type":"string","description":"UUID"},"revision":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The sent revision the files belong to; null if never sent"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLink"}}},"required":["proposal_id","revision","documents"]},"MaterialOrder":{"type":"object","properties":{"id":{"type":"string","description":"UUID"},"job_id":{"type":"string","description":"UUID"},"version_id":{"type":"string","description":"UUID"},"status":{"type":"string"},"fulfillment":{"type":"string","description":"delivery or pickup"},"delivery":{"type":"object","properties":{"day":{"anyOf":[{"type":"string"},{"type":"null"}]},"time":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where the order is delivered, usually the job address. Needs customers:read"}},"required":["day","time","location"]},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The note sent to the supplier. Needs customers:read"},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"included_costs":{"type":"boolean"},"included_inventory":{"type":"boolean"},"line_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"order_value_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Needs costs:read"},"recipients":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"status":{"type":"string"}},"required":["email","status"]}},"created_at":{"type":"string","description":"ISO 8601 date-time"},"completed_at":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"files":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLink"},"description":"Only the files this key may have: the drawing needs drawings:read; the material list needs costs:read too when sent with costs"}},"required":["id","job_id","version_id","status","fulfillment","delivery","po_number","note","suppliers","included_costs","included_inventory","line_count","order_value_cents","recipients","created_at","completed_at","files"],"description":"A material order sent to suppliers (Send to Lumberyard in the app)"},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event id. Also sent as the webhook-id header; the same on every retry, so use it to drop duplicates."},"company_id":{"type":"string","description":"The company the event belongs to"},"type":{"type":"string","description":"The event type. New types may be added; ignore ones you do not handle."},"created_at":{"type":"string","description":"ISO 8601 date-time"},"data":{"type":"object","properties":{"job_id":{"type":"string","description":"UUID"},"version_id":{"anyOf":[{"type":"string","description":"UUID"},{"type":"null"}]},"proposal_id":{"anyOf":[{"type":"string","description":"UUID"},{"type":"null"}]},"proposal_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_id":{"anyOf":[{"type":"string","description":"UUID"},{"type":"null"}]}},"required":["job_id"],"description":"Ids only: fetch details with your API key."}},"required":["id","company_id","type","created_at","data"]}}},"x-error-codes":{"missing_key":401,"invalid_key":401,"key_revoked":401,"key_expired":401,"api_disabled":403,"insufficient_scope":403,"subscription_required":402,"invalid_request":400,"not_found":404,"method_not_allowed":405,"rate_limited":429,"maintenance":503,"internal_error":500}}